The Desi Architect
Notes / Docker Sandboxes / Redis Sentinel Quorum Failover and Split-Brain Prevention
Docker Sandboxes · Tier 4: Architect & Chaos · Lab 51

Redis Sentinel Quorum Failover and Split-Brain Prevention

Freeze a Redis primary and watch three Sentinels detect the failure, reach quorum consensus, elect a replica, and demote the old primary on recovery. See how epoch counters prevent split-brain dual masters without manual intervention.

Time30 minutes
StackRedis 7Ports 26379, 26380, 26381, 16382
MemoryAbout 110 MB
Before thisLab 06Redis Basics
Verified runWindows, Mac, LinuxBash and PowerShell
  1. 1PrepareWhat you will learn
  2. 2PredictGuess before you run
  3. 3RunStep by step
  4. 4ObserveWhat you should see
  5. 5Break itChange one thing
  6. 6Clean upLeave nothing running
On this page
  1. 00 / What You Will Learn
  2. 01 / Why It Matters
  3. 02 / What We Are Building
  4. 03 / Words You Need
  5. 04 / Predict First
  6. 05 / Step by Step
  7. 06 / What You Should See
  8. 07 / Look Inside
  9. 08 / Break It, Fix It
  10. 09 / In Real Projects
  11. 10 / Interview Corner
  12. 11 / Clean Up

00 /What You Will Learn

By the end you will be able to
  • Explain the difference between subjective down (+sdown) and objective down (+odown).
  • Understand how quorum (2 of 3) prevents false alarms from a single faulty monitoring link.
  • Trace the 4-step failover process: detection, leader election, replica promotion, and reconfiguration.
  • Verify how a resurrected primary is demoted to replica to prevent split-brain dual-master writes.
  • Configure min-replicas-to-write to limit the lost-write window during an asymmetric network partition.

Before you start

Finish Lab 06 (Redis Basics) and Lab 23 (PostgreSQL Replication Lag) first. You should know what primary-replica replication is and why distributed nodes need health checks. Docker Desktop is required.