Keeping a Primary Alive
Replication alone does not heal a failure: if the primary dies, someone must promote a replica and tell clients where to connect. Redis Sentinel automates this for non clustered, primary replica deployments.
What Sentinel Does
Sentinel is a separate process that:
- Monitors the primary and its replicas with periodic pings.
- Notifies operators when something goes wrong.
- Performs automatic failover by promoting a replica when the primary is unreachable.
- Acts as a discovery service so clients ask Sentinel for the current primary address.
Quorum and Agreement
To avoid a single Sentinel wrongly declaring a failure, you run several Sentinels. A primary is marked down only when a configured quorum of Sentinels agree it is unreachable. The Sentinels then elect a leader to run the failover, promote a chosen replica, and reconfigure the others to follow it.
Sentinel Versus Cluster
Sentinel gives high availability but not sharding: all data still fits on one primary. Redis Cluster gives both sharding and failover. Choose Sentinel when one node holds your data and you only need resilience, and Cluster when you also must scale capacity.
Key idea
Redis Sentinel monitors a primary replica pair and, once a quorum of Sentinels agrees the primary is down, promotes a replica and points clients at it.