Split-brain, consensus, and quorum
partition handling.
split-brain is two nodes both believing they are leader during a partition; Raft/Paxos require a majority quorum to elect a leader and commit, so the minority side cannot make progress.
WHAT THIS TESTS Whether you understand the failure mode of dual leadership under partitions and how majority-based consensus structurally prevents divergent committed state.
WHY IT MATTERS Split-brain occurs when a network partition divides a cluster and each side independently believes it holds leadership. If both sides accept writes, they diverge irreconcilably, and merging later may silently drop or corrupt data. This is the worst outcome for a system of record.
A GOOD ANSWER COVERS Consensus algorithms like Raft and Paxos prevent split-brain by requiring a majority quorum, more than half of all nodes, for two critical actions: electing a leader and committing a log entry. A candidate becomes leader only after receiving votes from a majority, and in any partition at most one side can hold a majority. The minority side cannot elect a leader nor commit writes, so it correctly refuses to make progress and serves at most stale reads. Raft adds monotonically increasing terms so stale leaders are detected and stepped down.
COMMON WRONG ANSWERS Claiming heartbeats or timestamps alone prevent split-brain, allowing the minority partition to keep writing, or confusing a quorum with simply any two nodes regardless of cluster size.
LIKELY FOLLOW-UPS Why odd cluster sizes are preferred; what happens with an even split; how fencing tokens stop a deposed leader's late writes from being applied.
ONE CONCRETE EXAMPLE A five-node cluster partitions three-to-two. The three-node side retains a majority, elects a leader, and continues committing. The two-node side cannot reach the quorum of three, so it stops accepting writes. When the partition heals, the two stale nodes replay the leader's log and rejoin cleanly with no divergence.
Read the original → raft.github.io
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.