Thought Toys · Strategy & computation · Exhibit 61
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
Node A
—
Node B
—
—
—
Writes refused: 0Times A & B disagreed: 0
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.
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 →
← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 61.