I am using redis with 2 levels master/slave mode, without cluster or sentinel. Basically, I have A -> B -> C, where A is the primary master, B replicates from A, and C replicates from B. Both B and C are multiple instances. Now I need to restart all of our instances in order to do some security patches to the OS without downtime. According to the official Redis documentation, restarting a master will wipe out all data in slaves, which is not acceptable in our case. I am trying to find a solution that can restart A and B without wiping data on C. My tentative is to dump all data into a rdb file and restart A. However, this may still introduce some downtime because B and C will try to resync their data with A when it's loading back the rdb files. Another way I am thinking of is to turn off the replication of slaves while I am restarting the master, and then restart salves one by one. However, this requires lots of manual efforts to perform the restarts. Are there any better ways to perform this update without downtime?
A related question is how can I configure the system to be able to handle this kind restarting easily in the future? Can I enable persistent on all instances? If a slave is enabled for persistence. What will happen when it is restarted? Will it load the local rdb file or do a full synchronization when it restarts.
According to the official Redis documentation, restarting a master will wipe out all data in slaves, which is not acceptable in our case.
I'm not sure which part of the docs you're referring to, but in any case that's hardly the case - it all depends on how you do it. In your case, I'd use a workflow like the below to keep the service up and patch it in a rolling fashion: