GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
★ Read firstarXiv

A Critique of the CAP Theorem

'Consistency, availability, partition tolerance: pick two' is too vague to design with. Kleppmann shows why and offers a sharper question: does this operation's latency grow with network delay?

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2015
AUTHORS
Kleppmann
FROM
Affiliation not stated in the paper
PUBLISHED
Sep 2015 · arXiv
CITED BY
45Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 27% of this breakdown.

01

The paper in one minute

The CAP theorem says a replicated system cannot be consistent, available and partition-tolerant at once. Its popular form, "pick two", became a design slogan, and databases are often labeled CP or AP. Kleppmann argues that the slogan and the theorem both decide less than people think.

The terms are slippery. Consistency in CAP means linearizability, one specific strong model (every read sees the latest completed write), which is different from the C in ACID and from many weaker models in use. Availability, in Gilbert and Lynch's formal version, means every request to a non-failed node eventually gets a response, with no time limit, and even a node completely cut off must respond. By that definition, a system with an elected leader is "unavailable" even if its uptime in practice is very high, and a system that fails completely in a partition can count as available because all its nodes failed. Partition tolerance is not a feature at all; it is an assumption that partitions can happen, which every real network must make. Many practical systems end up neither CAP-consistent nor CAP-available.

The formal proof has gaps too. It only works if partitions can last forever, and in that model eventual consistency is impossible as well, so the theorem as stated does not separate strongly and eventually consistent systems. The CP versus AP division also hides a spectrum of models in between.

In place of CAP, Kleppmann proposes delay sensitivity. Model faults as network delay: a lost packet that is resent looks like extra delay, and a partition is a very long delay. Then ask, for each operation, whether its latency must grow with the delay d. Known lower bounds answer this: linearizable reads and writes are O(d); sequential consistency requires the read and write latencies to sum to at least d, so one can be O(1); causal consistency is the strongest model where both are O(1). An O(1) operation keeps working during a partition, at the cost that replicas converge later. Where the delay comes from also matters: a leader-based system waits on the leader, while a majority quorum waits only for the fastest majority.

THE IDEA, VISUALLY
LATENCY VS NETWORK DELAY d (TABLE 1) write read linearizability O(d) O(d) sequential consistency O(d) O(1) causal consistency O(1) O(1) O(d): latency grows with network delay; during a partition it can last as long as the partition. O(1): latency does not depend on the network; replicas converge later, so reads can be stale. Kleppmann's point: CAP's 'pick two' hides this. Its availability has no time limit, its consistency is one model of many, and 'partition tolerance' is an assumption about faults, not a feature. arXiv 1509.05393 v2, Kleppmann p99 LATENCY, ms (OUR SIMULATION, LOG SCALE) normal via leader 22.6 majority quorum 16.6 local read/write 0.1 cut off from 2 followers via leader 23.3 majority quorum 31.6 local read/write 0.1 cut off from the leader via leader 9,461.4 majority quorum 18.7 local read/write 0.1 A partition lasts 10 of 60 seconds. Writes through a leader wait for it to heal if the client cannot reach the leader; a quorum only needs any 3 of 5 replicas (Section 4.3). Local operations never wait, but in our model a cross-region read 100 ms after a write misses it 12.7% of the time.
Left: Table 1, the lowest possible latency of reads and writes for three consistency models as a function of network delay d. Right: our simulation of a five-replica store, p99 latency for writes through a leader, a majority quorum and local operations, in normal operation and in two partitions.
Research notes: the problem, approach and results
O(d) / O(1)

the paper's classification of an operation: latency proportional to network delay, or independent of it (Table 1)

9,461 ms vs 19 ms

p99 write latency in our simulation when the client cannot reach the leader: leader-based vs majority quorum

12.7%

chance a local read misses a write acknowledged 100 ms earlier in another region, in our model

THE PROBLEM

Engineers justify database choices with the CAP theorem, calling systems 'CP' or 'AP'. But the theorem's definitions are narrow and inconsistent across sources, and most real systems satisfy neither its consistency nor its availability, so the labels decide little.

THE IDEA

Survey the definitions of consistency, availability and partition tolerance, find the gaps in the formal proof, and replace CAP with a delay-sensitivity framework: classify each operation as O(d), if its latency grows with network delay d, or O(1), if it does not, using known lower bounds.

THE RESULT

Linearizable reads and writes must be O(d); sequential consistency can make one side O(1); causal consistency is the strongest model with both O(1). Partitions are just very large delays, and the design question becomes which operations may wait for the network and which must not.

02

Why it matters to an FDE

Replace "CP or AP?" with "which operations can wait?" For each operation in a customer's system (placing an order, reading a balance, updating a profile, writing an agent's memory), decide whether it must reflect the latest write everywhere, which means it will wait on the network, or whether it can be served locally and converge later. That is a design decision you can make and test.

Availability means latency in practice. A response after a minute is a failure to a user. Define availability with a timeout in the SLO, then check which operations can meet it during a regional network problem.

Leaders are a latency risk during faults. In our simulation, when the client could not reach the leader, p99 write latency rose to 9.5 seconds while a majority quorum stayed at 19 ms. Know where a customer's database leader sits and what happens to writes when the path to it degrades.

Local reads are fast and sometimes stale. In our model, a read in another region 100 ms after a write missed it 12.7% of the time. For dashboards and recommendations that is fine; for balances and permissions it is not.

This applies to AI systems too. Vector indexes, caches, agent memory and feature stores are replicated data. Decide per use whether a stale embedding or memory is acceptable, and design for read-your-writes where users expect to see what they just did.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The definitional problems, the formal gaps, the lower bounds, the framework, and topology

    Free account
  2. 04How it works

    The three definitions, the proof gaps, the lower bounds, heterogeneous delays, offline operation

    Premium
  3. 05The numbers that matter

    The lower bounds and Table 1, and what our simulation adds about leaders, quorums and stale reads

    Premium
  4. 06Try it yourself

    Restate Table 1, simulate leaders, quorums and local operations in partitions, price stale reads

    Premium
  5. 07Where it breaks

    Big-O hides constants, clocks are assumed unsynchronized, and the framework covers single registers

    Premium
  6. 08Using it on a deployment

    Classify operations, put availability in SLOs, locate leaders, and test stale reads

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →