Quick revision
The short answer
A failover needs a leader elected by a majority of all configured Sentinels, and with two of three in the dead data centre, DC-B's single Sentinel could see the primary down but never collect two votes, so its replica was never promoted. Moving a second Sentinel to DC-B would instead let DC-B promote during a mere partition, creating two primaries. The fix is a third site that runs only a Sentinel as a tie-breaker, plus min-replicas-to-write to fence an isolated old primary, and drills that decide whether automatic cross-site failover is wanted at all.
What to remember
In this answer, we saw that failover requires a leader elected by a majority of all Sentinels, so the single Sentinel in DC-B could never promote its replica when DC-A died. Moving a second Sentinel to DC-B would risk two primaries during a partition, so we added a third site with only a Sentinel as tie-breaker, limited writes on an isolated primary with min-replicas-to-write, and planned per-site drills and an explicit choice about automatic cross-site failover.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
A failover needs a leader elected by a majority of all configured Sentinels, and with two of three in the dead data centre, DC-B's single Sentinel could see the primary down but never collect two votes, so its replica was never promoted. Moving a second Sentinel to DC-B would instead let DC-B promote during a mere partition, creating two primaries. The fix is a third site that runs only a Sentinel as a tie-breaker, plus min-replicas-to-write to fence an isolated old primary, and drills that decide whether automatic cross-site failover is wanted at all.
Why this question is asked
Two data centres feel like redundancy, but any system that decides by majority vote needs an odd number of independent places to vote from. This incident shows the trap: the design survived the loss of the smaller site and failed completely on the loss of the larger one, for two hours, on a payments platform. Interviewers ask it to see whether we understand Sentinel's voting rules well enough to explain the outage and to avoid the obvious fix that creates a worse failure. In this answer, we will recap the rules, replay the outage, look at the tempting fix and why it is dangerous, design the three-site layout, and add fencing and drills.
1A Quick Recap of the Voting Rules
Sentinel separates detection from authorisation. Detection needs quorum Sentinels to agree that the primary is down. Authorisation needs one Sentinel to be elected leader by a majority of all configured Sentinels, counted against the total, reachable or not. With three Sentinels the majority is two.
2Replaying the Outage
The layout was: primary, replica 1 and Sentinels A1 and A2 in DC-A; replica 2 and Sentinel B1 in DC-B. When DC-A lost power, B1 stopped receiving replies from the primary and marked it subjectively down. If the quorum was 1 it could even mark it objectively down. Then it asked for votes to become leader. A1 and A2 were dark, so B1 had one vote out of three, never the two it needed. No leader means no failover, so replica 2 stayed a read-only replica and every write from DC-B's services failed until DC-A came back two hours later.
| Site | Members | Votes available |
|---|---|---|
| DC-A (no power) | primary, replica 1, Sentinels A1 and A2 | 0 of 3 |
| DC-B | replica 2, Sentinel B1 | 1 of 3, majority needs 2 |
3Why Two Sentinels in DC-B Is Not the Fix
The tempting fix is to move a Sentinel so DC-B has two. Then losing DC-A would leave two of three, a majority, and DC-B would fail over. But consider a network partition between the sites, with both still running. DC-B's two Sentinels form a majority, decide the primary is down and promote replica 2. Meanwhile, in DC-A, the old primary is alive and its local clients keep writing to it. We now have two primaries accepting different writes, and when the partition heals, the old primary is demoted and its writes since the split are discarded. On a payments platform, that is the worse outcome. And losing DC-B would now stop failover from DC-A. Any two-site layout has one site whose loss leaves no majority.
4The Fix: A Third Site as Tie-Breaker
Add a third failure domain that runs only a Sentinel: a small VM in another zone or region, or a different cloud. With Sentinels A1, B1 and C1 (moving A2 to the third site), any two sites form a majority of two. If DC-A dies, B1 and C1 elect a leader and promote replica 2. If DC-B dies, A1 and C1 keep the primary where it is. If the link between DC-A and DC-B breaks, C1 sides with whichever site it can reach, and the other site stays a minority that cannot promote anything.
6 messages in order. Play them, or step through them one at a time.
The tie-breaker needs little capacity, but it needs network paths to both sites that do not share their failure modes.
5Fencing the Old Primary and Practising
A primary that is cut off from everything can still accept writes from clients in its own site, writes that will be thrown away once it rejoins as a replica. To limit that, set min-replicas-to-write 1 and min-replicas-max-lag 10 on the data nodes. A primary that has had no replica acknowledging within 10 seconds then refuses writes. The price is real: if both replicas are down for maintenance, the primary refuses writes too, so the setting must match how many replicas we keep healthy.
Finally, decide on purpose whether automatic cross-site failover is wanted. For some payment data, a human decision after confirming the other site is truly down may be safer than an automatic switch. Whatever we choose, run a failure drill per site, power-off and partition, and time it.
6Follow-up questions
How would you promote the DC-B replica by hand safely during such an outage?
First make sure DC-A cannot come back as a primary on its own: confirm the power loss, and arrange that the old primary and its Sentinels stay down or start as replicas. Then run REPLICAOF NO ONE on replica 2, point DC-B's services at it (directly or by reconfiguring B1 with SENTINEL REMOVE and SENTINEL MONITOR for the new address), and accept that writes not yet replicated before the outage are lost. When DC-A returns, start its Redis nodes as replicas of replica 2 and reset its Sentinels before they rejoin, so they do not promote the stale old primary.
Why not set quorum to 1 so B1 can act alone?
Quorum only affects detection. B1 still needs a majority of votes to become leader, so quorum 1 would not have helped, and it would make false detections easier.
Does Redis Cluster avoid this problem?
No, it has the same majority rule among primaries. A cluster spread over two sites with the majority of primaries in one site cannot fail over when that site is lost.
7Conclusion
In this answer, we saw that failover requires a leader elected by a majority of all Sentinels, so the single Sentinel in DC-B could never promote its replica when DC-A died. Moving a second Sentinel to DC-B would risk two primaries during a partition, so we added a third site with only a Sentinel as tie-breaker, limited writes on an isolated primary with min-replicas-to-write, and planned per-site drills and an explicit choice about automatic cross-site failover.
Open with
The reason is the majority rule. Detection only needs the quorum, but a failover needs one Sentinel to be elected leader by a majority of all configured Sentinels, and there were three, so two votes were needed.
Then, if they want more
When DC-A lost power, the only Sentinel left was the one in DC-B. It could see the primary as down, but it could never collect a second vote, so no leader was elected and the DC-B replica was never promoted. Every write from DC-B failed for two hours.
The obvious fix, putting two Sentinels in DC-B, is dangerous: during a partition between the sites, DC-B would have a majority and promote its replica while the old primary in DC-A keeps taking writes from local clients, so we get two primaries and lose one side's writes. With two sites, one site's loss always leaves no majority.
The right fix is a third site, even a small VM in another zone or region, running only a Sentinel, so either data centre plus the tie-breaker forms a majority. I would also set min-replicas-to-write 1 with min-replicas-max-lag 10, so a primary cut off from all replicas stops accepting writes, accepting that writes are refused when no replica is healthy.
And I would run a failure drill per site, and decide explicitly whether automatic cross-site failover is even what we want for payment data, or whether an operator should promote by hand.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Redis documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "No failover happened and every Redis call from DC-B's services failed for two hours....": https://scrivio-interview-library.netlify.app/databases/redis-scaling/3af9a7bb53/