Catalog My learning Blog
Distributed Systems Explained: CAP, Clocks and Replication · Phase 1 · Lesson 6 · 3 min read

PACELC Theorem Explained: Beyond CAP

On this page
  1. What CAP leaves out: the PACELC theorem
  2. Why strong consistency costs latency
  3. PACELC classification of common databases
  4. Choosing latency or consistency per operation
  5. Check yourself

What CAP leaves out: the PACELC theorem

Partitions are rare. Most of the time every replica can reach every other, and CAP says nothing about that time. Yet a trade-off still exists: to give a strongly consistent answer, a system must coordinate replicas, and coordination takes round trips. Daniel Abadi named the fuller picture the PACELC theorem (2010, published 2012):

NoteIf there's a Partition, choose Availability or Consistency; Else, choose Latency or Consistency.
PACELC: during a partition, trade availability against consistency; the rest of the time, trade latency against consistency.
PACELC: during a partition, trade availability against consistency; the rest of the time, trade latency against consistency.

Why strong consistency costs latency

Strong consistency means a write isn't confirmed until enough replicas have it, or a read must check enough replicas or the leader. That's network round trips:

Replica placementTypical round tripEffect on a synchronous write
Same data center or zoneUnder 1 msBarely noticeable
Across zones in one region1 to 2 msSmall
Across continents70 to 150+ msEvery write pays it

Within a region the cost is small, which is why many systems are strongly consistent there. Across regions, every consistent write pays the speed of light, which is why global systems often relax consistency or route writes to a home region.

PACELC classification of common databases

SystemPartition (P)Else (E)Notes
Cassandra, DynamoDB (default reads)PAELFast reads and writes from nearby replicas; tunable per request
MongoDB (majority writes, primary reads)PCECWrites wait for a majority; reads from the primary
Spanner, CockroachDBPCECStrong consistency; pay latency, minimized with clock bounds and placement
PostgreSQL with async replicas, reading replicasPC (writes)EL (replica reads)Replica reads are fast but may be stale
Redis with async replicationPA-ishELSpeed first; failover can lose recent writes

Labels are simplifications: most systems let you tune per operation, so the same database can behave as EL for one query and EC for another.

Choosing latency or consistency per operation

PACELC turns into practical questions for each kind of data:

  • Can this read be a little stale? Then read from a nearby replica (EL): product pages, feeds, dashboards.
  • Must it reflect every confirmed write? Read from the leader or a quorum (EC): balances, inventory, permissions after a change.
  • Is the write critical? Wait for replicas before confirming (EC): payments. Otherwise confirm locally and replicate in the background (EL): click events.

The everyday "else" branch is where most of your latency budget goes, so it deserves more design attention than the rare partition.

Check yourself

Else, when there's no partition, the system still trades latency against consistency. Waiting for replicas to confirm makes reads and writes consistent but slower; answering from one replica is faster but may be stale. This trade-off applies all the time, not just during rare partitions.

Strong consistency needs replicas to coordinate, which takes at least one network round trip. Within a region that's a millisecond or so; across continents it's tens to hundreds of milliseconds, added to every consistent write.

Serve product pages from nearby replicas with possibly stale data (EL), and route inventory reservations through a consistent path (EC).

DynamoDB by default is PA/EL: available during partitions and low latency otherwise, with optional strongly consistent reads. Spanner is PC/EC: it prefers consistency in both cases and pays latency for it.

Partitions are rare, but the latency cost of consistency is paid on every request, so it's the trade-off most designs actually feel.