Thought Toys · Strategy & computation · Exhibit 61

When the wire breaks, pick one

Two computers hold the same value and copy each other's writes. Break the wire between them and a distributed store can stay perfectly consistent or always available — never provably both. There's no cleverer protocol that dodges the choice.

Two replicas, A and B, holding the same key

Writes refused: 0Times A & B disagreed: 0

Policy — what does this system protect?
Network
Try it
your turn — break the link, then write to both sides under each policy

What you're seeing

A and B are two replicas of the same stored value, kept in sync by copying each other's writes. While the wire is connected, it doesn't matter which policy you pick — every write reaches both sides instantly, so nothing is ever refused and A and B always agree. The interesting part only starts once you break the link.

Switch to Consistency (CP) and write to either side: the write is refused. The system won't accept a change it can't confirm on both replicas, so A and B can never be caught disagreeing — the cost is paid in availability. Switch to Availability (AP) instead and write to both A and B with the link still broken: both writes succeed immediately, nothing is ever refused — but now read A and read B and they can give you different answers to the same question. That's not a bug in one policy; it's the same broken wire, forcing the same underlying choice, twice. Heal the link and the two replicas reconcile back to one agreed value — here, by simply keeping whichever side wrote most recently.

The rule, exactly. Formalized by Gilbert & Lynch (2002): in an asynchronous network that is subject to partitions, no algorithm can guarantee both Consistency (every read sees the latest write, or an error) and Availability (every request gets a non-error response) once a Partition actually occurs — you can only choose which one breaks. Verified in node (improve/verify/61-cap-theorem.js, 11 checks over hundreds of randomized operation sequences): with the link up, CP and AP are byte-for-byte identical — always available, always consistent; with the link down, CP refuses 100% of writes and 0% of reads ever disagree, while AP refuses 0% of anything and the replicas measurably diverge in the large majority of trials; and CP never diverges while partitioned, AP never refuses while partitioned — the two costs are exclusive, not a matter of writing better code. Negative control: re-run the exact same operation sequence with the link connected and CP and AP produce identical results in every trial — it's specifically the partition that forces the choice, not a flaw baked into either policy.

Also in Strategy & computation: Better at both, and still better off trading →

All 23 in Strategy & computation
  1. 10The evolution of trust
  2. 23Sorting algorithms
  3. 24PageRank & the random surfer
  4. 25Huffman coding
  5. 26Dijkstra's shortest path
  6. 27Nash equilibria
  7. 33The learning-rate cliff
  8. 36A* pathfinding
  9. 37Braess's paradox
  10. 44Diffie–Hellman key exchange
  11. 45Preferential attachment
  12. 46Aliasing & the Nyquist limit
  13. 47The secretary problem
  14. 49Freeze too fast, stay stuck
  15. 51Cross one line, and its territory closes
  16. 56Catch one error, miss the next
  17. 57Why more processors stop helping
  18. 58Why a busy line explodes
  19. 59The set that's only sure when it says no
  20. 60The fit that memorizes instead of learns
  21. 61When the wire breaks, pick one — you are here
  22. 67Better at both, and still better off trading
  23. 69Everyone was consistent. The vote wasn't.

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 61.