Redis › Clustering

How does Redis Cluster automatically handle failover when a master node becomes unavailable?

Intermediate

Answer

When enough nodes in the cluster agree that a specific master has become unreachable, one of that master's replicas is automatically promoted to become the new master, taking over responsibility for that master's hash slots, allowing the cluster to continue operating without manual intervention.
-- Failover happens automatically once a majority
-- of master nodes agree the original master is down
redis-cli cluster nodes
Real-world example A retail company's Redis Cluster automatically promotes a replica to master status within seconds after the original master node crashes during a hardware failure, keeping their shopping cart service running with minimal disruption.

Common follow-ups: How long does automatic failover typically take to complete?;What happens to write requests that were in progress during the failover?