stackbook.io
🔍
← Back to Research

CAP Theorem in Modern Cloud Systems

CAP is not obsolete — but it is often misunderstood. Learn what the paper actually says and what breaks in practice when building distributed systems.

5 min read

CAP is among the most quoted and most misquoted results in distributed systems. "Pick two of three" fits on a slide, but it hides what the theorem actually states and encourages bad design arguments. In a modern cloud, where managed databases advertise tunable consistency and multi-region replication, the useful question is not which two letters you picked, but what your system does during a partition and what you pay the rest of the time.

What the theorem says

Eric Brewer presented CAP as a conjecture in 2000. Seth Gilbert and Nancy Lynch proved a formal version in 2002. In their model:

  • Consistency means linearizability: every read sees the most recent completed write, as if there were a single copy.
  • Availability means every request to a non-failing node eventually receives a non-error response.
  • Partition tolerance means the system keeps operating despite arbitrary message loss between nodes.

The result: in an asynchronous network, a system cannot guarantee both linearizability and availability when a partition occurs. Because partitions are a fact of networks, not an option you choose, the real choice is between consistency and availability during a partition.

Common misunderstandings

  • "CA systems exist." A system that is not partition tolerant is a single node, or it simply fails when the network does. In a distributed deployment you do not get to opt out of partitions.
  • "You permanently choose C or A." The trade-off applies only while a partition is happening. Most of the time the network works, and the interesting trade-off is different.
  • "Eventual consistency means AP, strong means CP." The labels are coarse. Many systems offer per-request choices, and some operations in the same product behave differently.
  • "Availability" in the theorem is stricter than in your SLA. The theorem demands that every non-failing node respond. Your product may count a response from a majority partition as available.

PACELC: the rest of the time

Daniel Abadi observed that CAP says nothing about normal operation, where a trade-off still exists between latency and consistency. His PACELC formulation reads: if there is a Partition, choose Availability or Consistency; Else, choose Latency or Consistency. Synchronously replicating a write across regions gives stronger consistency but adds round-trip latency to every write. That everyday cost usually matters more than partition behaviour.

What it looks like in cloud practice

Consider a three-replica store across availability zones using quorum reads and writes, with N replicas, W write acknowledgements and R read acknowledgements:

N = 3
W = 2, R = 2   -> R + W > N : reads overlap the latest write
W = 1, R = 1   -> faster, but stale reads possible

With majority quorums, the side of a partition holding two replicas continues; the side with one replica cannot meet W or R and refuses operations. That is consistency over availability for the minority. Dynamo-style systems relax this with sloppy quorums and hinted handoff, choosing availability and reconciling conflicts later. Spanner takes the other route: it favours consistency, uses synchronous replication via Paxos, and works to make unavailability rare through heavy engineering of the network and clocks. Calling it "CA" in marketing terms obscures that it still chooses consistency when partitioned.

Designing with CAP in mind

  1. Decide per operation, not per system. Account balance transfers need strong consistency. A product view counter does not.
  2. Define the partition behaviour explicitly. What does the user see when the minority side cannot reach quorum? An error, a stale read, or a queued write?
  3. Plan reconciliation. If you accept writes on both sides, specify merge rules: last-writer-wins loses data, while CRDTs or application-level merges preserve intent.
  4. Test partitions. Inject network faults in staging. Teams often discover their stated guarantees do not survive the first experiment.
  5. Measure the normal-case cost. Track cross-region write latency, since that is the price you pay every day for stronger guarantees.

Where CAP does not help

CAP is a statement about one property, linearizability, and one failure type. It does not cover weaker but useful guarantees such as causal consistency, read-your-writes or monotonic reads, which can remain available during partitions. It also says nothing about durability, performance, or Byzantine behaviour. Treat it as a boundary that rules out certain promises, not as a design method.

Key takeaways

  • CAP states that during a network partition you must choose between linearizability and availability.
  • Partition tolerance is not optional in a distributed system.
  • The trade-off applies during partitions; PACELC describes the latency versus consistency trade-off the rest of the time.
  • Choose behaviour per operation and document what users experience under partition.
  • Strong consistency does not mean the system never refuses requests; it means it refuses them rather than return wrong answers.
  • Test with injected faults to verify guarantees you claim.

Get the Design Review Checklist

One practical architecture lesson a week, plus the checklist we use to review designs. No spam.

Want this applied to your own system? Book an architecture design review.

Research papers

The papers and primary sources behind this article.