O'Reilly logo

Instant Redis Persistence by Matt Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Optimizing AOF performance (Intermediate)

This is a simple recipe for turning on AOF persistence-valued data integrity over performance. In many cases, data integrity isn't absolutely critical, and you can trade a little integrity for a significant performance gain.

How to do it...

  1. Edit your Redis configuration file to set:
    appendfsync everysec
  2. In order for the change to take effect, you will either need to restart Redis, or do it live by running the following on the command line of your Redis server:
    redis-cli config set appendfsync everysec
    

How it works...

When we configured Redis for maximum data durability in the earlier recipe, we set appendfsync always. That tells Redis that every time it writes something to the AOF,it should immediately tell ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required