Unit 10 of 12 · about 4 hours · explain
Partitions, asymmetric reachability, split-brain boundaries and correlated failure domains
A partition turns one cluster into two truths. This unit draws the line the minority must not cross, and names the shared fate that per-node thinking misses.
You'll be able to
- Draw two-sided and one-sided partitions with asymmetric reachability, and say what each node may conclude.
- State the split-brain boundary: which side may act under a majority rule, and what the minority must do.
- Map nodes to failure domains and give one correlated fault that a per-node model misses.
Covers
Read
In this order, only the parts listed
0 of 2 done
- Knowledge, majorities and system modelsDDIA 2e - Chapter 9 The Trouble with Distributed Systems
Chapter 9, Knowledge, Truth, and Lies (pp. 371-372): guesses from messages and stating the model; The Majority Rules (pp. 372-373): quorum death declarations; System Model and Reality (pp. 380-384): synchronous, partially synchronous and asynchronous timing with crash-stop, crash-recovery, limping and Byzantine nodes
- Partition behavior on a real runGossip Glomers - Unique IDs and Broadcast
Challenge 3c: five nodes with the partition nemesis; watch which nodes the checker still converges and which values wait for healing
Read the run as a partition log, not only a pass. Note what no node could conclude mid-run about the other side.
Focus on
- A partition is not death: both sides keep running with different knowledge. One-sided reachability is worse, since the cut-off node hears requests it can never answer.
- Under a majority rule of more than half, only a side holding the majority may decide. With five nodes split 3 and 2, the 2 must stop deciding, even while fully healthy.
- The book's model advice: design for partial synchrony with crash recovery, where delays, pauses and drift are usually bounded but sometimes arbitrarily large. Safety must survive the sometimes.
- Failure domains are shared fate: one rack, switch, power feed or zone holds many nodes. The Systems unit on failure domains, correctness signals and safe rollout maps the practice; here learn the correlated cases it assumes, like a deploy or a config pushed everywhere at once.
Common mistakes · 3
- Letting both sides serve writes and merge later without a plan. Without CRDTs or a stated conflict rule that is split brain with a nicer name.
- Treating one peer's heartbeat as cluster connectivity. Reachability is pairwise and asymmetric; a green link to one node says nothing about the rest.
- Counting live nodes instead of a fixed membership. A majority is out of all members, not out of the currently reachable ones, or two sides each claim it.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Node A hears B, B does not hear A, and both hear C. What can A conclude about B?Answer
Only that its own messages to B go unanswered. B may be dead, partitioned one way, or merely slow; A must not declare B dead alone.
2.Seven nodes split 4 and 3. Which side decides, and what must the 3 do?Answer
The 4 decides, holding more than half of 7. The 3 serves nothing that needs agreement and waits for healing or reassignment.
3.A rolling config push restarts every node within a minute. Per-node thinking says fine. What is wrong?Answer
The restarts correlate: the fault shares one cause and one window. The cluster can lose majority together, which independent-failure math never predicts.
4.Why does the book call partial synchrony with crash recovery the most useful model?Answer
It matches reality: timing usually holds but sometimes breaks without bound, and crashed nodes return with stable storage intact. Safety must hold in the bad intervals; only progress may wait them out.
Practice
- Building Distributed Systems Timekeeper PH-3: Simulate Split-Brain Caused by Clock Drift
Task PH-3: drive two sides of a partition to claim one lease through skewed clocks
Keep the losing side's log: the observable you want is both sides believing they hold it, which fencing must later refuse.
You're done when
You apply the majority rule to any split without notes, and your PH-3 log shows the double-claim your fencing design must refuse.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 12 more in the section
- DDIA 2e - Chapter 9 The Trouble with Distributed SystemsMartin Kleppmann and Chris Riccomini · primary
Read clocks, pauses, unreliable networks, partial failures and knowledge limits. For each failure, record what a node observes, what is true globally and what action is safe under that uncertainty.
- Gossip Glomers - Unique IDs and BroadcastFly.io and Jepsen · required
Each challenge runs locally under Maelstrom (v0.2.4; the pages were tested on 0.2.3) with its checker and, where the page says so, the partition nemesis; keep the run directory as the history. Do challenge 2 (unique IDs under partition with total availability) and 3a to 3c (broadcast, then with partitions). A pass shows uniqueness or convergence in that run, not ordering or recency.
Also in this section
- Time, Clocks, and the Ordering of Events in a Distributed System (Lamport, 1978)Leslie Lamport · required
Read the partial ordering and logical clocks sections: happens-before, the Clock Condition, rules IR1 and IR2, and the total order. Its ties are broken arbitrarily, so the total order is not causality.
- Logical Physical Clocks and Consistent Snapshots (Kulkarni et al., 2014)University at Buffalo · support
Read the hybrid logical clock algorithm and its bounds; the paper reports the logical counter staying well below its proved bound in practice, so measure your own.
- SWIM: Scalable Weakly-consistent Infection-style Process Group Membership (Das et al., 2002)Cornell University · support
Read the direct and indirect probing detector, infection-style dissemination, the suspicion mechanism and incarnation numbers. Suspicion timeouts depend on the workload.
- The phi Accrual Failure Detector (Hayashibara et al., 2004)JAIST · support
Read how phi is computed from the heartbeat inter-arrival history and how a threshold trades detection time for false suspicion. Its normal approximation misleads under bursty delay, so test with pause traces too.
- How to Do Distributed Locking (Kleppmann, 2016)Martin Kleppmann · required
Read the process-pause, network-delay and fencing-token sections with DDIA 2e Chapter 9 "Distributed Locks and Leases". Treat the Redlock critique as dated to 2016; the lasting lesson is that the storage service must reject a write that carries an older token.
- Cambridge Concurrent and Distributed Systems Notes (Kleppmann) - Time, Clocks and OrderingUniversity of Cambridge (Martin Kleppmann) · support
Use Chapter 3 (physical clocks, NTP and monotonic clocks, happens-before) and Section 4.1 (Lamport and vector clocks with worked examples) as the derivation workbook: work Exercises 7 to 13. Each section marks where its public lecture video starts.
- Building Distributed Systems - The TimekeeperBuild Distributed Systems · optional
Only the first three tasks are free (clock reads and backward jumps, a monotonic wrapper, a split-brain lease). Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- Building Distributed Systems - The GossiperBuild Distributed Systems · optional
Only the first three tasks are free (basic broadcast, tree topology, random gossip). Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- HLD Handbook - Clocks, Failure Detection and Consistent HashingHLD Handbook · required
Read Part 3 clocks and ordering, failure detection and consistent hashing. Use its exercises to compare assumptions, then verify claims against your own histories.
- MIT 6.5840 - Failure and Paper Discussion LensMIT PDOS · support
Use the RPC, GFS, Raft and consistency lectures to identify which timing assumptions affect progress and which invariants must not depend on time. Do not start the Raft lab yet.
- Replicated Log and Stream Processor - Time and Membership SliceRoadmap-Final · support
Add incarnation IDs, logical timestamps, gossip membership, suspicion metrics and fenced ownership. Retain seeds and minimized traces for every false-failure or stale-actor case.
- AlgoMaster System Design practice - clock, gossip and lease drillsAlgoMaster · support
Use only the named problems: Advance a Lamport Logical Clock, Compare Two Vector Clocks, Update a Vector Clock on Receive, Advance a Hybrid Logical Clock, Simulate Gossip Rumor Spread and Implement a Lease Lock with Fencing Tokens. Each states its function signature and checks small deterministic cases.