$ man pacelc # Abadi, 2010
PACELC
PACELC extends the CAP theorem with the case CAP ignores: normal operation. It says: if there is a Partition, a replicated system must choose between Availability and Consistency; Else, when the network is healthy, it must still choose between Latency and Consistency.
if Partition then (A or C) else (L or C)
Partitions are rare. Latency is paid on every single request. That is why the “else” half usually matters more when you pick a database.
Why consistency costs latency
To be consistent, a write must reach other replicas before it is confirmed, and other replicas can be an ocean away.
$ ./write x --leader eu-central --replicas us-east,ap-southeast
The same write, consistent (EC) vs fast (EL)
- One leader in Europe, replicas in the US and Singapore. The network is healthy: this is the E (else) case.
- EC: the leader confirms x = 2 only after a majority (itself + US-EAST) has it. Correct, but the client waits a full ocean round trip, ~90 ms.
- EL: the leader confirms x = 3 after its own write, in ~2 ms, and replicates in the background.
- The bill arrives later: a user in Singapore reads the nearby replica and gets x = 1. Low latency bought with stale data.
Classifying real systems
Each system gets two letters: what it does during a partition (PA or PC) and what it does otherwise (EL or EC). Many are configurable, so the table shows the usual default.
| System | Class | Notes |
|---|---|---|
| Cassandra, ScyllaDB, Riak | PA/EL | Tunable per query: QUORUM reads and writes move toward EC |
| DynamoDB | PA/EL | Eventually consistent reads by default; strongly consistent reads are EC (not available on global secondary indexes) |
| MongoDB | PA/EC (Abadi, 2012) | Today depends on write and read concern; majority + linearizable reads behave PC/EC |
| PNUTS (Yahoo) | PC/EL | Abadi’s example of an unusual combination |
| Spanner, CockroachDB, YugabyteDB | PC/EC | Consensus on every write; pay latency for correctness |
| etcd, ZooKeeper | PC/EC | Coordination data where wrong answers are unacceptable |
How to use it
- Ask the else question first: “Can this read be a few seconds stale?” If yes, EL buys you lower latency and cheaper multi-region reads.
- Choose per operation, not per database: a checkout can use strong reads while product reviews use eventually consistent ones.
- Put the leader (or the quorum) close to the writers. Most of the EC penalty is the speed of light between regions.
Common mistakes
- Thinking PACELC replaces CAP. It extends it; the partition rule still holds.
- Reading the latency cost from a benchmark in one region. Run it across the regions you will actually deploy.
- Treating the letters as fixed. Most modern databases let you pick consistency per query or per table.
Learning Resources
Papers and articles
- Consistency Tradeoffs in Modern Distributed Database System Design: Daniel Abadi, IEEE Computer, 2012, the PACELC paper
- Problems with CAP, and Yahoo’s little known NoSQL system: Abadi’s original 2010 blog post
- PACELC Theorem, ScyllaDB glossary