Failover between Primary and Replica

Redis Failover Process

Redis Failover Process

When a primary node fails in a Redis cluster, its associated replica is promoted to the new primary node. Here's what happens during this process:

Key Points

  • The primary node manages and owns hash slots.
  • Replica nodes replicate data but do not own slots.
  • During failover, write operations may pause temporarily.

Write operations during the failover process are briefly paused to prevent inconsistencies. The cluster promotes a replica to a new primary to handle slots owned by the failed node.

Failover Timeline

  • Primary Node Fails: Write operations stop.
  • Cluster Detects Failure: Failover is initiated.
  • Replica Promotion: A replica is promoted to primary.
  • Writes Resume: New primary starts accepting writes.

Click the button below to simulate a failover process:

Simulation: Primary node fails → Replica promoted → Writes resume seamlessly on the new primary node.

Comments