The PACELC Theorem
Extend CAP to normal operating conditions: If Partitioned (P) choose Availability (A) or Consistency (C); Else (E) choose Latency (L) or Consistency (C).
PACELC Decision Tree 🌳
Explicitly handling both Partitioned and Normal operation trade-offs.
01.1. Why Daniel Abadi Created PACELC
While the CAP Theorem provided a crucial foundational framework, system architects quickly identified a major practical limitation: CAP only describes database behavior during rare network partitions.
In production cloud environments, network partitions occur less than 0.1% of the time. In the remaining 99.9% of normal operations, the system is functioning without network partitions.
In 2012, Professor Daniel Abadi formulated the PACELC Theorem to address the critical trade-off that occurs during ordinary happy-path operation:
\textbf{If } Partitioned \implies choose Availability or Consistency;
\textbf{E}lse \implies choose Latency or Consistency.
Even when all networks and nodes are perfectly healthy, a database cannot simultaneously achieve sub-millisecond write latency and instant cross-region strong consistency, because transmitting data over physical distance takes time.
02.2. The Four PACELC Archetypes
PACELC categorizes all distributed storage engines into four primary design profiles:
- PC/EC (e.g., Google Spanner, CockroachDB, Bigtable, ZooKeeper):
- If Partitioned: Favors Consistency (rejects writes on minority partitions).
- Else (Normal): Favors Consistency (waits for synchronous Raft/Paxos quorum consensus across nodes before returning success to the client, accepting
+20msto+50mslatency overhead).
- PA/EL (e.g., Apache Cassandra, Amazon DynamoDB, Couchbase, Riak):
- If Partitioned: Favors Availability (allows independent writes on all partitions).
- Else (Normal): Favors Latency (writes locally to in-memory MemTable and commits immediately in
< 2ms, replicating asynchronously in the background).
- PC/EL (e.g., PostgreSQL with Asynchronous Primary-Replica Replication):
- If Partitioned: Favors Consistency (all writes must hit the primary).
- Else (Normal): Favors Latency (read queries hit asynchronous replicas with
< 1mslatency, tolerating minor replication lag).
- PA/EC (Rare Hybrid):
- If Partitioned: Favors Availability (serves stale reads).
- Else (Normal): Favors Consistency (enforces synchronous quorum verification during normal operation).
03.3. Architectural Summary Matrix
| Database | PACELC Profile | Normal Operation Write Latency | Partition Behavior |
|---|---|---|---|
| CockroachDB | PC / EC | 15ms - 50ms (Synchronous Raft Consensus) | Halts minority replicas; strict linearizability. |
| Google Spanner | PC / EC | 10ms - 30ms (TrueTime + 2PC + Paxos) | Rejects transactions in disconnected regions. |
| Apache Cassandra | PA / EL | 1ms - 5ms (Local Append-Only CommitLog) | Accepts writes on any live node; eventual consistency. |
| DynamoDB (Default) | PA / EL | 2ms - 8ms (Single-Digit Millisecond SSD) | High availability; eventual consistency across AZs. |
| MongoDB (w:1) | PA / EL | < 2ms (Unacknowledged replica write) | Read stale secondary; primary failover window. |
| MongoDB (w:majority) | PC / EC | 10ms - 25ms (Majority ACK) | Rejects writes if majority replica set unreachable. |
⚖️Architectural Trade-offs & Production Realities
Architectural Advantages
- Accurately reflects the day-to-day latency trade-offs inherent in synchronous vs asynchronous replication
- Provides a granular framework for selecting databases based on both uptime SLAs and p99 latency budgets
Trade-offs & Constraints
- More complex taxonomy (5 letters) than the traditional 3-letter CAP theorem
- Many modern databases feature tunable consistency levels (e.g. Cassandra QUORUM vs ONE), making classification dynamic
Cassandra trades strong consistency for low write latency during normal operation by writing locally to CommitLog + MemTable and asynchronously replicating to peers.
🎯 Staff+ Engineering Takeaways
- PACELC covers both abnormal (partition) and normal (happy path) database trade-offs.
- In normal operations: High consistency requires network roundtrips, increasing write latency.
- Low latency requires asynchronous background replication (eventual consistency).
- PA/EL maximizes speed and availability; PC/EC maximizes data correctness.
Topic Knowledge Assessment 🧠
Step through 1 scenario question to test your staff-level grasp.
In PACELC notation, what does PA/EL mean?
How clear and staff-actionable was this system breakdown?