System Design

Beyond CAP: Why PACELC is the Real Rule for Distributed Databases

Why the CAP theorem is an oversimplification. Learn how the PACELC theorem explains the trade-offs between consistency and latency even when there is no network partition.

Sachin Sarawgi·April 20, 2026·2 min read
#distributed-systems#pacelc#cap-theorem#databases#consistency#latency

Beyond CAP: Understanding the PACELC Theorem

The CAP theorem (Consistency, Availability, Partition-tolerance) is a useful abstraction, but it only describes what happens when the network is broken. In the real world, the network is "fine" 99% of the time. PACELC fills the gap.

1. What is PACELC?

PACELC is an extension of CAP. It is read as:

  • If there is a Partition (P), choose between Availability (A) and Consistency (C).
  • Else (E), choose between Latency (L) and Consistency (C).

2. The Latency-Consistency Trade-off

When you write to a distributed database like DynamoDB or Cassandra during normal operation:

  1. High Consistency (EC): The system waits for all replicas to acknowledge the write. This is safe but increases Latency.
  2. Low Latency (EL): The system acknowledges the write after hitting one node and replicates to others in the background. This is fast but risks stale reads (Eventual Consistency).

3. Real-world DB Mapping

  • DynamoDB/Cassandra (PA/EL): Prioritize availability during partitions and low latency during normal operation via asynchronous replication.
  • MongoDB (PA/EC): Available during partitions, but prioritizes consistency by waiting for primary acknowledgment by default.

Summary

PACELC provides a more realistic framework for architects. If you are building a Stock Matching Engine, you must choose PC/EC. If you are building a Social Media Feed, you choose PA/EL.


Next: Case Study: Designing Stripe’s Ledger System Related: Consistent Hashing: The Core of Distributed Scale

📚

Recommended Resources

Designing Data-Intensive ApplicationsBest Seller

The definitive guide to building scalable, reliable distributed systems by Martin Kleppmann.

View on Amazon
Kafka: The Definitive GuideEditor's Pick

Real-time data and stream processing by Confluent engineers.

View on Amazon
Apache Kafka Series on Udemy

Hands-on Kafka course covering producers, consumers, Kafka Streams, and Connect.

View Course

Practical engineering notes

Get the next backend guide in your inbox

One useful note when a new deep dive is published: system design tradeoffs, Java production lessons, Kafka debugging, database patterns, and AI infrastructure.

No spam. Just practical notes you can use at work.

Sachin Sarawgi

Written by

Sachin Sarawgi

Engineering Manager and backend engineer with 10+ years building distributed systems across fintech, enterprise SaaS, and startups. CodeSprintPro is where I write practical guides on system design, Java, Kafka, databases, AI infrastructure, and production reliability.

Found this useful? Share it: