Foundations Distributed Systems

PACELC Theorem

A refinement of CAP that accounts for latency trade-offs even in the absence of partitions — the realistic model for database selection.

⏱ 6 min read

What it is

PACELC, proposed by Daniel Abadi in 2012, extends the CAP theorem by explicitly addressing the latency/consistency trade-off that exists in distributed systems even during normal operation — not just during network partitions. The acronym stands for: in case of Partition, choose between Availability and Consistency; Else (during normal operation), choose between Latency and Consistency. This makes PACELC a more complete model for practical database selection decisions than CAP alone.

The key insight is that even when the network is fully healthy, a distributed system must decide whether to wait for confirmation from all replicas before responding (low latency/eventual consistency) or to ensure all replicas agree before acknowledging a write (higher latency/strong consistency). This is a meaningful trade-off in every distributed database operation, not just during the rare partition events that CAP focuses on.

Why it exists

CAP's focus on partition scenarios, while theoretically important, does not capture the day-to-day trade-offs that matter most to system designers. Network partitions are relatively rare events in well-operated data centers. The latency/consistency trade-off in normal operation, however, affects every single database operation and directly impacts user-facing response times. PACELC gives architects the framework to have a complete conversation about a database's behavior both during failures and during normal operation.

PACELC also clarifies the difference between systems that appear similar under CAP but behave very differently in practice. Both Cassandra and DynamoDB are classified as AP under CAP — but under PACELC, Cassandra is PA/EL (highly available, low latency, high consistency sacrifice) while systems like PNUTS/Yahoo are PA/EC (available during partition, but strongly consistent in normal operation). These are fundamentally different systems for different use cases.

When to use

  • When comparing distributed databases where latency is as important as consistency behavior — which is most real-world database selection decisions.
  • When the system needs to make explicit trade-offs between read/write latency and the freshness of data returned.
  • When building globally distributed systems where cross-region replication latency makes the EL/EC trade-off particularly consequential.
  • When evaluating databases for financial or healthcare applications where the latency cost of strong consistency must be explicitly weighed against its benefits.

When not to use

  • PACELC is a simplified model — it does not capture all the nuances of a specific database's replication and consistency implementation. Always read the database's consistency documentation directly.
  • For single-node systems, both CAP and PACELC are irrelevant to the consistency/partition discussion (though latency remains a design concern).
  • Do not treat PACELC classifications as fixed — most modern databases are configurable and their effective PACELC classification depends on the consistency level configured for each operation.

Typical architecture

The PACELC framework classifies systems along two dimensions: partition behavior (P→A or P→C) and normal-operation behavior (E→L or E→C). The following table shows the classification of well-known databases and the architectural implications for each quadrant.


PACELC Classification of Common Databases:
─────────────────────────────────────────────────────────────────
Database           P-choice    E-choice    Notes
─────────────────────────────────────────────────────────────────
DynamoDB (default) PA          EL          Eventual consistency; low latency writes
Cassandra (ONE)    PA          EL          Tunable; default favors availability
Riak               PA          EL          Vector clocks for conflict resolution
CouchDB            PA          EL          MVCC; designed for offline sync

Cassandra (QUORUM) PA          EC          Tuned for consistency at latency cost
PNUTS/Yahoo        PA          EC          Available during partition, consistent else

BigTable/HBase     PC          EC          Sacrifices availability for consistency
ZooKeeper          PC          EC          Consensus-based; will refuse in minority
etcd               PC          EC          Raft consensus; consistent always
PostgreSQL cluster PC          EC          Synchronous replication options
VoltDB             PC          EC          In-memory ACID with synchronous replication
─────────────────────────────────────────────────────────────────

Decision framework:
  PA/EL: Choose when availability and low latency outweigh consistency
         (user sessions, shopping carts, social feeds, IoT telemetry)
  PA/EC: Choose when you need normal-operation consistency but can
         tolerate partition-time availability loss
  PC/EC: Choose when strong consistency is always required
         (financial transactions, config management, distributed locks)
          

Pros and cons

Pros

  • More complete than CAP — covers the trade-offs that affect every operation, not just partition scenarios.
  • Makes the latency cost of strong consistency explicit, enabling cost/benefit analysis.
  • Differentiates databases that appear identical under CAP but have different normal-operation behavior.
  • Provides a practical framework for comparing database candidates against both consistency and latency requirements.

Cons

  • Still a simplified model — real systems have tunable consistency levels that blur the EL/EC classification.
  • Less widely known than CAP — requires more explanation when communicating with stakeholders unfamiliar with it.
  • Does not address all important database properties: durability guarantees, query expressiveness, operational complexity, and cost are also crucial selection criteria.
  • Classifications can change with database version updates and configuration changes.

Implementation notes

The EL trade-off in practice: In a PA/EL system like Cassandra with consistency level ONE, a write is acknowledged as soon as a single replica confirms it. Other replicas are updated asynchronously. This means reads of recently written data from a different replica may return the previous value — eventual consistency. The benefit is that writes complete at local latency (sub-millisecond for in-region), making the system extremely fast for high-throughput write workloads. The EC alternative would be QUORUM writes — waiting for a majority of replicas, which adds latency but guarantees that a subsequent QUORUM read will always see the latest write.

Global distribution amplifies the trade-off: In a multi-region database (e.g., DynamoDB global tables, CockroachDB multi-region, Cassandra multi-DC), the EL/EC trade-off becomes dramatically more consequential. Cross-region replication typically adds 50–200 ms of round-trip latency. A strongly consistent (EC) multi-region write therefore costs hundreds of milliseconds per operation — which is completely unacceptable for user-facing APIs but may be acceptable for financial settlement or order fulfillment processes.

Practical database selection workflow: Start with the question "can this use case tolerate stale reads?" If yes, PA/EL databases are candidates. If no, consider PC/EC. Then ask "how often do we expect network partitions, and what should happen during one?" If the service must stay available, eliminate PC options. Finally, apply operational, cost, and query capability filters to the remaining candidates.

Common failure modes

  • Using EL for financial data: Selecting DynamoDB or Cassandra at default consistency for balance or inventory data, then discovering that concurrent writes produce lost-update anomalies.
  • Using EC for user-facing reads: Configuring PostgreSQL with synchronous multi-region replication for a read-heavy user profile service — adding 150 ms to every page load.
  • Not benchmarking the EC overhead: Assuming strong consistency is "good enough" for performance without measuring the actual latency penalty of quorum writes at the expected throughput.
  • Ignoring the P behavior in SLA planning: Building on a PC database without planning for the availability hit during partition events — which will occur and will result in downtime.

Decision checklist

  • Is this use case tolerant of stale reads? (If no, eliminate EL databases from consideration.)
  • What is the acceptable write latency target — and have we measured the overhead of quorum writes at the expected throughput?
  • Is the deployment single-region or multi-region? Multi-region makes the EL/EC latency difference 10–100× larger.
  • What should happen during a network partition — must the service stay available, or can it refuse requests?
  • Have we tested the chosen database under simulated partition conditions (chaos engineering) to validate its actual behavior?
  • For tunable-consistency databases, is the consistency level configured per-operation, and is it appropriate for each operation type?
  • Is the PACELC classification of the chosen database documented in an ADR so future teams understand the trade-off that was accepted?

Example use cases

  • A ride-sharing app's driver location service uses DynamoDB (PA/EL) — a driver location that is 500 ms stale is acceptable, but location write latency must stay under 50 ms to handle high update rates.
  • A trading platform's order book uses a PC/EC database (VoltDB) — every microsecond of consistency guarantee is worth the latency cost because stale order state leads to incorrect trades.
  • A globally distributed e-commerce catalog uses Cassandra (PA/EL by default, EC for inventory) — product description reads can tolerate stale data, but inventory decrement writes use QUORUM to prevent overselling.
  • CAP Theorem — the predecessor to PACELC, covering partition behavior only.
  • Eventual Consistency — the consistency model used by EL systems and how it manifests in practice.
  • Quality Attributes — latency and consistency are both architecture-significant quality attributes that PACELC forces into explicit tension.

Further reading