Cap Theorem hard
In a 5-node Raft cluster, a network partition isolates 2 nodes from the other 3. Simultaneously, the 3-node side experiences a 'Split Vote' during an election where no candidate gets a majority. What is the impact?
- A The entire system becomes Unavailable for all write operations until the election timeouts trigger a successful re-election of a leader.
- B The minority side of the partition automatically elects its own leader because they experience significantly less contention for the vote.
- C Raft utilizes a secondary random tie-breaking mechanism to ensure that one candidate is always guaranteed to win the first vote.
- D The system automatically degrades to a fallback Eventual Consistency mode to ensure that user write requests can still be accepted.
Answer: A. The entire system becomes Unavailable for all write operations until the election timeouts trigger a successful re-election of a leader.
This scenario demonstrates the 'CP' nature of Raft. A majority (3 of 5) is required to elect a leader. If the healthy majority side splits its vote exactly (e.g., 1-1-1), no candidate achieves the required quorum. The system remains unavailable for writes during this time. To resolve this, candidates use randomized election timeouts to ensure that one node eventually starts a target election before the others, breaking the tie.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is a 'Split Brain' scenario?
- The PACELC theorem extends CAP by stating: Even when there is NO partition (E), the system must choose between:
- Why is a CA (Consistent + Available) system generally considered impossible for distributed web applications?
- In CAP, 'Consistency' is equivalent to:
- In the CAP Theorem, what does the 'P' stand for?
- What causes a Network Partition?