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

Protecting your data via replication (Advanced)

The reason why we use RDB or AOF to persist a Redis dataset to disk is to not lose all our data when Redis restarts. However, an AOF doesn't protect against the server itself catching fire, or the VM mysteriously disappearing. To handle that risk, we configure backups. Restoring from backups takes a fair amount of time, and we'd probably like to have our data more readily available than that.

Enter Redis replication. While it is often used to provide read slaves, to increase the capacity of a Redis cluster, it is also very handy when you need to have a second copy of your dataset available for failover purposes.

In this recipe, we'll configure a very simple high-availability cluster with manual failover. ...

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