Skip to content
AI360Xpert

PACELC Theorem

PACELC Theorem architecture
PACELC Theorem architecture

Overview

The PACELC theorem extends the CAP theorem by describing the trade-off a distributed system makes even when the network is healthy. It reads: if there is a Partition (P), choose between Availability (A) and Consistency (C); Else (E), when the system runs normally, choose between Latency (L) and Consistency (C).

🧠 Mental model: CAP only asks "what do you do during a fire drill?" PACELC also asks "what do you do on a normal day?" - because even without a fire, you still choose between speed and double-checking everything.

Key Concepts

PACELC splits reasoning into two situations:

  • During a partition (PA vs PC): identical to CAP's availability-versus-consistency choice.
  • Else, no partition (EL vs EC): to guarantee that every replica agrees on a value, a write must reach and be acknowledged by multiple replicas before returning. That coordination adds latency. A system can instead return quickly after one replica accepts the write (low latency) and propagate the change asynchronously, which weakens consistency.

Systems are classified by both halves, such as PA/EL or PC/EC. The Else branch is really a statement about replication: waiting for more replicas raises both durability and consistency but costs round trips, while replying early trades that guarantee for speed.

Classification Partition behavior Normal behavior Example
PA/EL Stay available Favor low latency DynamoDB, Cassandra
PC/EC Stay consistent Favor consistency VoltDB, single-node MySQL
PA/EC Stay available Favor consistency MongoDB (default)

Trade-offs

The Else branch is a dial, not a switch. Requiring acknowledgment from a quorum of replicas moves you toward EC and adds the latency of the slowest replica in the quorum; acknowledging after a single replica moves you toward EL and risks serving values that have not yet propagated. The same store can sit at different points per operation, letting a critical write pay for consistency while a cheap read stays fast.

Lean EC (consistency) when Lean EL (latency) when
Reads must reflect the latest write Fast response matters more than freshness
Correctness outweighs a few extra milliseconds Slightly stale data is harmless

Interview Tips

  • Introduce PACELC right after CAP to cover the normal-operation case that CAP ignores.
  • Say the classification aloud, for example "DynamoDB is PA/EL," to sound precise.
  • Tie the Else branch to a concrete number: quorum writes add a network round trip, often single-digit milliseconds within a region and far more across regions.
  • Note that the same database can be tuned per request, so the label describes defaults, not a hard limit.

Summary

  • PACELC extends CAP by adding the Else branch that applies when no partition is present.
  • During a partition, PACELC repeats CAP's availability-versus-consistency choice.
  • In normal operation, the choice is latency versus consistency, driven by how many replicas a write waits for.
  • Systems are labeled on both axes, such as PA/EL or PC/EC.
  • PACELC captures the everyday trade-off that governs most of a system's runtime, not just failure scenarios.