map / distributed-systems / partitions
Distributed Systems · principle 5 of 6
Partitions
When the network splits, a system must choose between refusing some requests and risking divergent answers.
01 · Why it’s true
Networks can fail in ways that split machines into groups that can’t reach each other. From the inside, a slow or unreachable node looks the same as a dead one.
During a split, a system that accepts writes on both sides will disagree when the network heals; a system that refuses writes on the minority side stays consistent but is unavailable there. That’s the core of the CAP theorem: when a partition happens, you choose between consistency and availability. Majority quorums are a common choice — only the side with more than half the nodes keeps working, so two sides can never both accept writes.
02 · Picture it
03 · In the interview
- Explaining CAP in plain terms, without over-claiming.
- Understanding why an odd number of nodes is common (3 or 5).
- Avoiding split-brain: two nodes that both think they’re in charge.
04 · Practice question
“Why do coordination systems usually run 3 or 5 nodes rather than 2 or 4?”
A strong answer covers
- Decisions need a majority so that two sides of a split can’t both proceed.
- With 3 nodes the majority is 2, so you survive 1 failure; 4 nodes need 3, so they still survive only 1.
- With 5 nodes the majority is 3, so you survive 2 failures.
- Even numbers add cost without adding fault tolerance, and 2 nodes can’t survive any failure while keeping a majority.