The full picture
🎬 CAP: what a partition actually forces you to choose
1 / 5Two replicas of the same key, connected by a network link. While the link is healthy they share one history — consistency and availability are both free.
| System | PACELC | What it means in practice |
|---|---|---|
| Postgres / MySQL (single leader) | PC/EC | writes stop if the leader is unreachable; failover is a availability gap |
| etcd, ZooKeeper, Consul | PC/EC | majority quorum or no writes — correctness is the whole point |
| Cassandra, DynamoDB (tunable) | PA/EL | stays writable under partition; you dial C up per query with quorums |
| MongoDB (default) | PC/EC | primary-only writes; w:majority makes the C explicit |
| DNS | PA/EL | the canonical AP system — TTL is the staleness budget |
- 'CA' is a category error: a single-node database is trivially CA because it has no partitions to survive — the moment you replicate across a network, P is imposed on you. Saying 'we chose CA' tells an interviewer you haven't thought about failure.
- Availability in CAP is absolute, not a percentage: it means every non-failing node answers. A system that returns errors from a minority partition is 'unavailable' in CAP terms while still being 99.99% available in SLO terms. The theorem is a proof, not an ops metric — don't conflate them.
- The choice is per-operation, not per-system: the same product can take payments through a CP path (a linearizable ledger) and serve the product catalogue through an AP path (a stale-tolerant cache). Senior answers assign consistency levels to operations, not to databases.
- PACELC's 'else' branch is where you actually live: partitions are rare; cross-region round-trips are constant. Choosing
w:majorityacross three regions costs you ~100ms on every write with no partition in sight — that latency, not the theorem, is what shapes most designs.