Suggest an editImprove this articleRefine the answer for “How does Sentinel provide Redis's fault tolerance?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Redis Sentinel provides fault tolerance through continuous node monitoring (`PING`), and when the master stops responding, it's first marked "subjectively down" (SDOWN); only once several Sentinels agree that the node is genuinely unreachable does it become "objectively down" (ODOWN), and the Sentinels elect a leader that promotes one of the replicas to the new master. **Key point:** after a failover, Sentinel notifies clients via Pub/Sub (`+switch-master`), and when the old master comes back, it automatically becomes a replica of the new one - all without manual intervention, though data that hadn't yet reached the replicas due to asynchronous replication can be lost.Shown above the full answer for quick recall.Answer (EN)Image**Redis Sentinel** provides fault tolerance by continuously monitoring Redis nodes and automatically electing a new master on failure. Here's how it works, step by step: ### 1. Monitoring Every Sentinel tracks all the Redis nodes in the system: - it regularly pings (`PING`) the master and its replicas; - if the master doesn't respond within a set time (`down-after-milliseconds`), the Sentinel marks it as **subjectively down (SDOWN)**, *"as far as I can tell, it's dead"*. ### 2. Quorum (confirming the failure) A single Sentinel can't declare the master "down" on its own. To avoid false positives, several Sentinels have to **agree** that the node is genuinely unreachable. Once that agreement is reached, the master is marked **objectively down (ODOWN)**, *"objectively dead"*. ### 3. Automatic failover Once the master is declared ODOWN: 1. The Sentinels elect a **new "leader" among themselves** (via a Raft-like voting process). 2. The leader picks one of the master's replicas and **promotes it to the new master** using the `SLAVEOF NO ONE` command. 3. The remaining replicas reconfigure themselves to replicate from this new master. ### 4. Notifying clients After the failover, Sentinel: - updates its configuration, - broadcasts notifications to clients over Pub/Sub channels (`+switch-master`), - Sentinel-aware clients automatically connect to the new master. ### 5. Recovering the old master If the old master comes back: - it **automatically becomes a replica** of the new master, - the system stays in a stable state with no manual intervention. ### Summary: Redis Sentinel provides fault tolerance through three mechanisms: 1. **Monitoring the availability** of every node. 2. **A Sentinel vote** to confirm the failure. 3. **Automatic failover** and updating the clients' configuration. This lets Redis **recover on its own** after a master fails, with no data loss (other than data that hadn't yet reached the replicas because of asynchronous replication).For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.