Redis Configuration – Turning Off Append Only and Snapshot

redisreplication

I want to turn off data persistence on my Redis master, by turning off appendonly and snapshots, I want to use the replica for persistence, will turning off these two have any affect on replication?

Best Answer

Yes. If your primary instance crashes and restarts it will be empty; at this point your replica will also become empty, that would be a disaster.

Have a read of the replication docs https://redis.io/topics/replication . It suggests if you really want to avoid writing to storage in your primary (which really shouldn’t be a big deal with modern hardware), you must make sure you haven’t configured your primary instance to automatically restart and you’ll need to make sure you don’t manually restart it. You would make sure a secondary has taken over first and your old primary is now set to serve as a replica of that.