The network splits your cluster in two. A request lands on the side that's cut off from the newest write. Do you answer anyway, or refuse to answer at all?
R2 is stranded on the wrong side of the partition. Toggle between the two choices and watch: one refuses to respond at all; the other answers immediately with whatever it has — even knowing it might be stale.
During a network partition, there is no third option:
- CP
Refuse to answer unless you can prove you have the latest write. Cut off, you can't prove it — so you block or error. Consistency is preserved; availability is not.
- AP
Always answer with whatever you have locally. Availability is preserved; the answer might be stale.
PACELC extends this past the partition case: even with no partition (the "Else" branch), a system still trades Latency against Consistency — confirming a write with every replica synchronously raises consistency but costs latency, and vice versa.
- P — the partition-time choice: Consistency or Availability.
- E — the normal-time ("Else") choice: Consistency or Latency.
Matches: A synchronously-replicated SQL cluster
Toggle both axes independently and watch pacelcLabel produce one of the four canonical two-letter-pair
labels — then see whether it matches any of the three example systems below.
- CP, applied to R2
resolveDuringPartition(STALE_PARTITION_SCENARIO, "CP")returns responds = false, value = null, consistent = true. No answer, but no risk either. - AP, applied to R2
resolveDuringPartition(STALE_PARTITION_SCENARIO, "AP")returns responds = true, value = 1, consistent = false. An answer, but a stale one — R2's local value hasn't caught up. - Classifying real systems
- Dynamo/Cassandra: chooses Availability during a partition () and Latency otherwise () → PA/EL
- A majority-write MongoDB: chooses Consistency during a partition () but Latency otherwise () → PC/EL
- A fully-synchronous SQL cluster: chooses Consistency both times (, ) → PC/EC
R2 is cut off from the latest write. Click CP and AP until you've produced both a consistent response and an inconsistent one.
seen so far: none
CAP says a partition forces a binary choice between Consistency and Availability — there's no way around it. PACELC adds the other half of the story: even when nothing is broken, every system is still trading Latency against Consistency, and that choice is exactly as real as the partition-time one.