Back to results for “Replication”
Redis › Redis Replication

What happens to a Redis Cluster's replicas during a failover event, and how does the cluster decide which replica gets promoted?

Advanced

Answer

When a master node becomes unreachable, the cluster's remaining nodes vote among themselves, and if a majority agrees the master has truly failed, one of that master's replicas, typically the one with the most up to date data based on replication offset, is automatically promoted to become the new master for that portion of the hash slots.
-- Failover selection considers each replica's
-- replication offset to choose the most up to date one
redis-cli cluster nodes
Real-world example A cluster automatically promotes the most up to date replica to become the new master within seconds after detecting the original master has failed, minimizing both downtime and the amount of data that might be lost during the transition.

Common follow-ups: What happens if multiple replicas have identical replication offsets during a failover decision?;How long does this automatic failover and promotion process typically take?