CAP and PACELC
What CAP really forces during a partition, who loses availability, and why PACELC's latency-versus-consistency choice matters every day.
25 min7 steps
By the end you can
- State precisely what CAP forces during a network partition and which clients lose availability
- Use PACELC to name and quantify the latency cost of consistency when there is no partition
- Classify a concrete store configuration by what it gives up during a partition and in normal operation
What the theorem actually says
Consistency
- Linearizable
- A read never misses a finished write
- Not the C in ACID
Availability
- Every live node answers
- A timeout counts as down
Partition tolerance
- Network drops messages
- Not optional across machines
Who loses availability, and how many
Loading question…
The available choice, and its bill
PACELC: the trade-off you pay every day
- Local replica only0.5 ms
- Majority, same zone2 ms
- Majority, cross-region80 ms
- Majority, cross-continent150 ms
Log scale: each gridline step is 10×.
Loading question…
Classify a configuration, not a product
PA/EL
- Cassandra, Riak defaults
- Available and fast
- Stale or conflicting reads
PC/EC
- Consensus stores
- Refuses minority side
- Pays a round trip always
PC/EL
- Yahoo PNUTS
- Per-record master
- Local reads may be stale
Select quorum overlap in Script, then sloppy quorum and hinted handoff. R + W > N guarantees overlap only for a fixed replica group.
What CAP does not tell you
Before
Normal operation
Detect
Timeout fires: partition suspected
Partition
Limit risky operations (ATM cash cap)
Heal
Merge state
Recover
Repair broken invariants
Check your mastery
Majority side?
N/2 + 1
keeps committing
Round trip paid?
2nd nearest
follower for a majority
Score 80% or more. Next: consistency models and CRDTs.
Mastery check
4 questions on fresh variants. One attempt each, no time limit. Score 80% or more to master the lesson.
Answer this step to continue.