DBRaven
Distributed Systems

CAP Theorem and PACELC

Intermediate

Why distributed systems cannot simultaneously provide consistency, availability, and partition tolerance: and how PACELC extends this to the latency-consistency tradeoff that applies even when the network is healthy.

Step 1 of 5

The Partition: What CAP Is Actually About

A network partition is when two groups of nodes in a distributed system cannot communicate with each other. This is not a failure mode you can preventit is a physical reality. Network switches fail, cables are cut, AWS availability zones lose connectivity. Any distributed system must operate during partitions.

CAP theorem (Brewer, 2000; formally proven by Gilbert and Lynch, 2002) states: during a network partition, a distributed system can guarantee either Consistency or Availability: not both.

Consistency in CAP means linearizability: every read sees the most recent write, as if the system is a single node. Not ACID consistency: those are different concepts. A CP system refuses to serve requests if it cannot guarantee the latest data. An AP system continues serving requests but may return stale data.

Partition tolerance is not optional: it is the premise of the theorem. You cannot design a distributed system that never experiences partitions. The real choice is: when a partition occurs, which property do you sacrifice?

Network partition: choose C (refuse requests) or A (serve stale data)

Key Takeaways

  • CAP consistency = linearizability (every read sees the latest write), not ACID consistency
  • Partition tolerance is not a choice: all distributed systems must tolerate partitions
  • The real design question: what does your system do when a partition occurs?
1 / 5