PACELC Trade-Offs
PACELC is a rule that extends CAP by asking what a system trades away during a partition and during normal operation. It says a system chooses between availability and consistency in a partition, and between latency and consistency the rest of the time.
From CAP to PACELC
PACELC extends a rule from the Beginner course.
CAP applies only while a partition lasts. It says nothing about the far longer time when the network is healthy.
Most running hours have no partition. A design rule that ignores those hours misses the everyday trade-off.
PACELC fills the gap. Its name packs the two choices into one short rule.
Read the letters
P stands for partition. When a partition happens, A is availability and C is consistency, and the system picks one.
E stands for else, meaning normal operation. In normal operation, L is latency and C is consistency, and the system picks one again.
The two picks are independent. A system can favour consistency in a partition and still favour latency on normal days.
Naming both picks is the point. A design that states only its partition behaviour hides half of its character.
The everyday latency choice
A consistent answer often needs agreement across copies. Agreement takes messages, and messages take time.
A round trip inside one data center takes about 0.5 milliseconds. A round trip across an ocean takes about 150 milliseconds.
Suppose an answer must return within 100 milliseconds. Checking a copy across an ocean needs a round trip of about 150 milliseconds.
150 − 100 = 50, so the check alone finishes 50 milliseconds late.
Choosing the near copy answers faster. The near copy may hold older data, so the answer may be stale.
The partition choice, revisited
During a partition, majority machinery decides who may act. A part without a majority chooses between refusing work and risking conflict.
Choosing availability keeps every part answering. Choosing consistency keeps one truth and lets the other part wait.
Neither pick is a moral judgement. The right pick follows from what the data means to its users.
How to answer with PACELC
In an interview, state the partition pick first. Then state the normal-day pick, with the latency cost attached.
A complete answer can be one sentence. This design stays consistent in a partition and accepts slightly stale reads to stay fast on normal days.
Consensus, logs, leases, and fencing are how the chosen behaviour is enforced.
PACELC says the trade-off never sleeps, because normal days test consistency against latency just as partitions test it against availability.
The two PACELC choices
| Situation | The choice | The cost |
|---|---|---|
| Partition | Availability or consistency | Outage or conflicting data |
| Normal operation | Latency or consistency | Slower answers or older answers |
Exercise
What does PACELC add beyond CAP?