The string CAP appears zero times in the OSDI 2012 Spanner paper, and so do the surnames Gilbert and Lynch. The first system to provide such guarantees at global scale never names the theorem, which is about one register in a network nobody chooses. The slogan is the only version most engineers can produce on demand.
This is not an interview answer: a two-minute CAP explanation prepared in advance gets both the model and the trade-off wrong.
The thesis: the theorem is narrow, true, and mostly silent about the decision in front of you — and the slogan that replaced it is not narrower, it is wrong. The system design practical guide carries the compressed version; this is the proof underneath it.
Can you have all three? Not as the question is usually asked. The theorem is about one guarantee pair during one fault, P is a property of your network rather than a switch anyone holds, and a third option has no slot in the binary account — give up both.
Section 3.2 of the paper says that while it is impossible to provide all three properties, any two of these three properties can be achieved.
Read the verbs: that is a claim about what you can achieve, not a licence to label a system by the two it chose.
What the CAP theorem actually says — Theorem 1, Corollary 1.1, and the third option
You cannot guarantee atomic consistency and availability in all fair executions, including those where messages are lost — and you cannot guarantee it even in executions where nothing is lost at all. Theorem 1:
It is impossible in the asynchronous network model to implement a read/write data object that guarantees the following properties: • Availability • Atomic consistency in all fair executions (including those in which messages are lost).
Corollary 1.1 is the result nobody quotes:
It is impossible in the asynchronous network model to implement a read/write data object that guarantees the following properties: • Availability, in all fair executions, • Atomic consistency, in fair executions in which no messages are lost.
The authors' 2011 gloss: it is even impossible to guarantee consistency when there are no partitions, and return a bad (inconsistent) answer only when partitions occur
— there is no timeout below which consistency is free. Their retrospective adds it back: Perhaps surprisingly, there is a third option: some systems may sacrifice both consistency and availability!
A CAP-consistent system can be inconsistent when the network is perfectly healthy. Corollary 1.1 makes that a theorem, not a caveat. Outside the model entirely, latency matters most, and Kleppmann's list of what the theorem does not cover starts there: the CAP theorem says nothing about latency, which people tend to care about more than availability
.
What C, A and P mean in the paper — and how narrow each one is
C is the strictest consistency model in common use, chosen because it was easy to prove; A requires a response and nothing more, with no time bound; P describes the network itself. Kleppmann on the scope: The CAP system model is a single, read-write register – that's all. For example, the CAP theorem says nothing about transactions that touch multiple objects.
C is atomic consistency, and it was chosen because it was easy to prove
Atomic consistency means a total order on all operations in which each looks as if it completed at a single instant, so a read starting after a write completes returns that value or a later one. The load-bearing sentence came in 2011: While there are several weaker consistency conditions used in practice (e.g., sequential consistency, causal consistency, etc.), we focus on atomicity due to its simplicity.
A means every request received by a non-failing node gets a response
The paper's definition, verbatim: For a distributed system to be continuously available, every request received by a non-failing node in the system must result in a response. That is, any algorithm used by the service must eventually terminate.
No time bound, and the paper admits this puts no bound on how long the algorithm may run before terminating.
Kleppmann's emphasis is the one for a design doc: It's not sufficient for some node to be able to handle the request: any non-failing node needs to be able to handle it. Many so-called \
highly available\(i.e. low downtime) systems actually do not meet this definition of availability.
Availability in CAP does not mean fast, correct, or recent.
P is a property of your network, not a feature you can switch off
P is not a switch; it is a statement about the network the servers talk over. In 2011 the authors restated it as a property of the environment: communication among the servers is not reliable, and the servers may be partitioned into multiple groups that cannot communicate with each other.
It also covers the one-node partition.
Kleppmann is blunter: The internet and all our datacenters have this property, so you don't really have any choice in this matter.
You do not choose whether the network partitions — one box, no partition, no CAP decision at all, the scope argument in simple web architecture for early-stage websites.
Nine real systems, and what their own documentation says they do
No production system below fits a letter, and every entry below says so in its own documentation or paper — or in the analyst who read it. Documentation facts as of October 2026, not recommendations.
They land on one running example — the anonymized multi-tenant commerce engine: a tenant-keyed shard, a read-mostly catalogue, an inventory reservation, an order write. Every verdict is which term a system stresses.
ZooKeeper is neither, by default — and its AP mode
ships disabled
ZooKeeper by default meets neither half of the guarantee, and the read-only mode that would make it available on the minority side ships disabled; in Apache's words, a `read` in ZooKeeper is not a quorum operation and a server will respond immediately to a client that is performing a `read`.
Writes are linearizable and need a quorum of n/2+1; the guarantee is OSC(U). Kleppmann's verdict: ZooKeeper by default is neither CAP-consistent (CP) nor CAP-available (AP) – it's really just 'P'.
Then the correction: It actually provides an excellent level of consistency!
The configuration that earns the folklore label arrived in 3.4.0 behind readonlymode.enabled, disabled by default, and even on, ROM clients will be unable to write values and see changes from other clients
— not the usual meaning of available. Kleppmann's verdict on the mode itself: This read-only mode is CAP-available.
A partition is not a crash. CAP models one fault — the network — so a GC pause or a full disk sits outside it.
PostgreSQL is just P
— serializable is not linearizable
PostgreSQL guarantees serializability, not linearizability, and refuses to trade either for availability, so under the theorem's definitions it is neither.
Its serializable level is a technique known in academic database literature as Serializable Snapshot Isolation
, and detection will trigger a serialization failure
— SQLSTATE 40001. Kleppmann's comparison: PostgreSQL's SSI provides serializability but not linearizability, and Oracle provides neither. Just because a database is branded 'ACID' doesn't mean it meets the CAP theorem's definition of consistency.
Hence neither 'CP' nor 'AP', they are just 'P', whatever that means.
Replication is asynchronous log shipping, so there is a window for data loss should the primary server suffer a catastrophic failure
, and a client on the minority side of a partition cannot write.
PostgreSQL's answer to concurrency is to roll the transaction back, with false positives by design.
Spanner demonstrates the theorem, and its paper never mentions it
Spanner delivers linearizability by waiting out a measured clock uncertainty, so it pays latency for consistency — and its paper never cites the theorem it satisfies.
External consistency, in the paper's words: the serialization order satisfies external consistency (or equivalently, linearizability [20])
. TrueTime's uncertainty is generally less than 10ms
, and the price is explicit — the expected wait is at least 2 ∗ ε
. The applications' own trade is separate: most applications will choose lower latency over higher availability, as long as they can survive 1 or 2 datacenter failures
.
A string count over the retrieved OSDI 2012 text returns zero occurrences of CAP
, zero of Gilbert
, zero of Lynch
, and four uses of partition in the body — all four about splitting keys, so the word never appears in its network sense. A fifth hit is a bibliography title. Spanner is not a counterexample; its authors never claimed to be one. The wait ends only because a bound exists, and that bound comes from GPS and atomic clocks.
Cosmos DB, DynamoDB and the vendors who made the trade-off configurable
These products do not have a consistency identity. They have a consistency dial, set per request and per account, and the strong end is priced in milliseconds.
DynamoDB: reads are eventually consistent (default) and strongly consistent reads
, strong ones only supported on tables and local secondary indexes
, and multi-Region strong consistency replicates synchronously ... before the write returns
. Cosmos DB offers five levels and cites PACELC, not CAP: distributed databases must balance read consistency, availability, latency, and throughput as defined by the PACELC theorem
. Strong consistency reduces availability during failures because data can't replicate and commit in every region
. Dynamo underneath is configurable R and W quorums — at R=W=1 it is CAP-available, at R+W>N minority-side clients cannot reach a quorum
, and sloppy quorums with read repair can lead to tricky edge cases in which deleted data is resurrected
.
Kafka names the trade-off itself — and it is not CAP
Kafka's durability dial is per topic, and the vendor names it in plainest words: consistency versus availability.
With min.insync.replicas at 2 and acks=all, the message is not lost unless both hosts crash. It also means that if one of the hosts crashes, the partition is no longer available for writes
— Red Hat's wording, which this draft could not re-open by automated fetch. Kafka's own design documentation, as of an archived patch of 082/design.html rather than the live page, calls the same knob a trade-off between consistency and availability
.
Bigtable and HBase split that dial in two — HBase's guide ships both a Timeline-consistent High Available Reads
chapter and a Synchronous Replication
chapter — so freshness and durability are separate knobs, not one label.
The industry already talks about this correctly: broker semantics and dead-letter design belong to Queues vs Streams.
CRDTs do not beat CAP — they change what consistency means
CRDTs deliver convergence under partitions by weakening what consistency means, not by finding a third leg.
The claim is exact: Replicas of any CRDT are guaranteed to converge in a self-stabilising manner, despite any number of failures.
Two mechanisms: state-based types merge as a monotonic semilattice
, op-based types require that concurrent operations should commute.
The same paper lists A solution to the CAP problem, Strong Eventual Consistency (SEC)
as a contribution and, three bullets later, We show that SEC is incomparable to sequential consistency.
Kleppmann makes the bucket critique sharper: ZooKeeper's read-only mode still provides a total ordering of historical writes, which is a vastly stronger guarantee than the 'AP' in a system like Riak or Cassandra – so it's ridiculous to throw them into the same bucket
.
The three questions the slogan cannot answer
None of the three has the answer you want, because each asks for one bit where the decision needs four dimensions.
Is my database CP or AP?
The better question has four parts: which operation, which configuration, which fault, and what consistent
means in this product's own documentation. ZooKeeper and PostgreSQL are the worked examples, failing the label in opposite directions.
Does Kubernetes violate CAP?
Kubernetes is outside CAP's scope, not in violation of it, because the data plane's availability is not a consistency guarantee at all — it is a controller loop. The control plane is a different question, and its quorum behaviour is not settled here. The ReplicaSet docs say its purpose is to maintain a stable set of replica Pods running at any given time,
achieved by creating and deleting Pods as needed to reach the desired number
— convergence by reconciliation, the CRDT idea applied to pod lifecycle.
Is Cassandra AP or CP?
Neither label — per operation and per configuration. Golab's wording covers it: some systems can be tuned to provide either AP, CP, or none of the above.
And Kleppmann's reason is the one-bit problem: It is simply not possible to encode this subtlety in one bit of information.
The authors say their own terms are ambiguous
Perspectives on the CAP Theorem concedes five things: consistency was picked for convenience, not surveyed; availability admits a late answer; partition tolerance is a statement about the network; there is a third option; and the impossibility bites even with no messages lost. The theorem is not oversold; it is narrow.
Brewer retracts the framing he inspired
Brewer himself calls the slogan misleading and says it prohibits a tiny part of the design space.
From 2012: The '2 of 3' formulation was always misleading because it tended to oversimplify the tensions among properties. Now such nuances matter. CAP prohibits only a tiny part of the design space: perfect availability and consistency in the presence of partitions, which are rare.
The person it came from has disowned it as always misleading.
The bridge to everything after it: pragmatically, a partition is a time bound on communication,
and designers can set time bounds intentionally according to target response times; systems with tighter bounds will likely enter partition mode more often and at times when the network is merely slow and not actually partitioned.
A 200 ms timeout on a follower-read path is a consistency policy written in a config file.
During a partition
is a number you chose.
Kleppmann: the model does not describe any shipping database
The definitions in the proof are the definitions that count, and no shipping datastore fits either label.
His argument starts with the definitions: Mathematics requires precision. The proof only holds if you use the words with the same meaning as they are used in the proof.
Reuse the words loosely and the proof stops covering your system. No real datastore classifies: The fact that we haven't been able to classify even one datastore as unambiguously 'AP' or 'CP' should be telling us something: those are simply not the right labels to describe systems.
The AP label also comes from async replication chosen for latency: the reason for that choice is often the latency of wide-area networks, not just wanting to tolerate datacenter and network failures.
His closing request is to retire all references to the CAP theorem, stop talking about it, and put the poor thing to rest.
One counterweight. Marc Brooker's version, carried in the hub's correction, calls CAP nearly irrelevant
for cloud-style systems and names the trade-offs worth naming instead: durability versus write latency, consistency versus latency, isolation versus throughput.
CAP theorem vs PACELC — the trade-off that is always on
PACELC adds the half CAP omits: if there is no partition, the trade-off is still consistency against latency — and since Golab's 2018 proof, that half is a theorem rather than a slogan.
The formulation is Abadi's, quoted by Golab: if Partition then Availability or Consistency, Else Latency or Consistency,
capturing the observation that the trade-off between safety and liveness is often made in practice even while the network is reliable.
Golab records Abadi's reason for the second half: many practical systems sacrifice C to reduce latency
, irrespective of network failures.
Golab shows the PAC half is implied by CAP and proves the EL half from a latency bound: for partition-free executions, the system cannot always guarantee both consistency and operation latency less than half of the minimum message delay
. Golab also notes PACELC distinguishes P from A and C, thus discouraging the 'two out of three' interpretation
— from the man who proved the theorem. Abadi's system classification table is not printed here: the circulating copy is a slide deck.
The four decisions this replaces — starting with your timeout
The moment your system decides it is partitioned is the moment a timeout expires, so that timeout is a consistency policy and belongs in review like any other parameter. Write it down for every cross-node dependency — follower reads, replication waits, quorum RPCs — and what the operation does when it fires. Cosmos DB makes it concrete: unresponsive regions are taken out of the quorum set in order to preserve strong consistency
, and those regions are no longer able to serve reads until readded into the quorum
.
A tighter timeout does not make a system more consistent. It makes it more often partitioned, at times when the network is merely slow. The rule: a partition-mode decision must be per operation, not per system.
Which operations may be served a stale read — and what happens when the bound is exceeded
Classify your operations and write down the staleness each one tolerates, because that number, not the product's label, is the design decision.
Every product is per operation: DynamoDB's strong reads are a per-request flag on tables and LSIs only, and Cosmos DB's override applies only within the SDK client
while the account still writes and replicates data synchronously to every region
. ZooKeeper splits reads from writes and documents a Timeliness bound — the client view is up-to-date within a certain time bound ... on the order of tens of seconds
. That is a number a design doc can carry; no letter supplies one.
How stale is acceptable, and what happens when you exceed it?
A staleness bound is acceptable when a value N seconds old changes nothing the reader can see or act on — so operations get classified, not databases. Work the commerce engine: inventory reservation is the hard one, a read then a write and the write-skew shape that cannot be made commutative, so it decides the topology.
| Operation | Acceptable staleness | When exceeded |
|---|---|---|
| Catalogue browse | The replication lag; invisible | Nothing to do |
| Inventory reservation | Zero | Fail the read, retry the authoritative path |
| Order placement | Zero | Abort and retry, 40001 priced |
| Payment authorisation | Zero | Idempotency key replays the first result |
We chose eventual consistency
is not an artefact; the table is. Ecommerce architecture at 100 users is the proof it works at its smallest: with no replica there is no staleness to bound.
Synchronous or asynchronous replication — a latency choice wearing a CAP costume
This is a write-latency budget choice, not an identity, and the number to argue about is p99.
The design call itself is how to design a highly available system's, and it owns the math. What CAP adds is why it is a latency decision: async replication is usually chosen for latency, not for partition tolerance, so the question is what p99 write latency the design spends on durability. Both price tags are vendor-quoted — Cosmos DB's two times round-trip time between the two farthest regions plus 10 ms at the 99th percentile, DynamoDB replicating before the write returns
.
Artefact: a per-data-set decision with a latency number attached.
Which operations can be made commutative or idempotent so the choice disappears
The operations that cannot be made commutative or idempotent are the ones whose consistency the design must actually pay for, and they decide the topology. Three levers. Commutativity — a set-union add-to-cart converges on every replica, CRDT-style. Idempotency keys — the same request twice produces one charge, the right property for payments. Read repair and gossip anti-entropy — with the resurrection hazard named above.
Mark every write: commutative, idempotent-with-a-key, or neither — and remember convergence is a trade, not an upgrade, because SEC is incomparable to sequential consistency. The commerce engine's inventory reservation is neither, which is why it gets a single authoritative path; splitting the system is one way to give it one, the seam with monolith vs microservices: the trade-offs. Consensus internals belong to the six decisions that make a system distributed, the model taxonomy to Consistency vs Availability: How to Choose and Strong vs Eventual Consistency, delivery semantics to Queues vs Streams.
What to take away — and what this post is not
Stop labelling your database. Write down four numbers instead: your timeout, your per-operation staleness bound, your replication latency budget, and which writes cannot be made commutative.
The theorem is about one register during one fault. During a partition
is a timeout you set. Consistency is decided per operation and per configuration. The daily trade-off is against latency — PACELC's half, not CAP's.
What is missing here is deliberate: How to Design a Distributed System owns consensus and ordering, Consistency vs Availability: How to Choose and Strong vs Eventual Consistency own the taxonomy, Queues vs Streams owns delivery semantics.
Related Reading
System Design: A Practical Guide for Software Engineers
Search system design and you get a diagram: a load balancer, a cache, a queue, a database, and a glossary.
Simple Web Architecture for Early Stage Websites
Most early-stage software projects adopt infrastructure architectures designed for hyperscale user loads they may never
Ecommerce Architecture at 100 Users: One Server, One Process
Why does every ecommerce architecture guide assume you have a team?