PACELC Theorem
Extending CAP with latency vs consistency in normal operation
The PACELC theorem, proposed by Daniel Abadi (2012), extends CAP by addressing what happens in the absence of a network partition. CAP only describes behavior during partitions; PACELC recognizes that even under normal operation, distributed systems face a fundamental trade-off between Latency (L) and Consistency (C). The full statement: if a Partition occurs, choose between Availability and Consistency (PAC); Else (normal operation), choose between Latency and Consistency (ELC). This makes PACELC more practically useful than CAP — systems like DynamoDB (PA/EL), Cassandra (PA/EL), and Google Spanner (PC/EC) can be precisely categorized and their trade-offs predicted.
Key Points
- PACELC notation: PA/EL (DynamoDB, Cassandra — available during partitions, low latency normally), PC/EC (Google Spanner, Zookeeper — consistent during partitions, consistent normally).
- Google Spanner achieves PC/EC using TrueTime (GPS + atomic clocks) to minimize uncertainty windows, achieving external consistency with ~7 ms commit latency globally.
- Cassandra's consistency level tuning (ONE vs. QUORUM vs. ALL) is a direct PACELC slider: ONE is PA/EL, QUORUM is PA/EC/EL compromise, ALL is PA/EC.
- The ELC trade-off is why synchronous replication adds write latency — waiting for the replica ACK adds one network round-trip (≥1 ms intra-AZ, ≥70 ms cross-region).
- PostgreSQL with synchronous_commit=on is PC/EC; with synchronous_commit=off it becomes PA/EL, accepting possible data loss on crash for lower write latency.
- PACELC helps explain why geo-distributed systems feel slower — strong consistency (EC) across continents requires consensus rounds that accumulate speed-of-light latency.
- Most real-world databases are tunable on the ELC axis: eventual → session → monotonic read → monotonic write → strong consistency — each level adds coordination overhead.
- For interview depth: CAP is sufficient for "distributed systems 101"; PACELC demonstrates mastery of the nuances that distinguish principal-level engineering thinking.
Real-World Example
Google Spanner powers Google's financial systems (AdWords billing, Google Pay) precisely because it is PC/EC — it sacrifices some latency for guaranteed external consistency across globally distributed data centers. Google published their TrueTime implementation in the 2012 Spanner OSDI paper, revealing atomic clocks and GPS receivers in every datacenter as the hardware foundation for their consistency guarantees.