Vol. I a living index of named laws · est. mmxxvi no ads · no account
The Law Tomeindex of named laws

The CAP Theorem

also known as — Brewer's theorem
"When the network splits, a distributed store must choose between staying consistent and staying available."
In plain English

What does The CAP Theorem mean?

A distributed data store can provide at most two of three guarantees at once: consistency, that every read sees the latest write; availability, that every request gets a non-error response; and partition tolerance, that the system keeps working despite dropped messages between nodes. Because network partitions are a fact of distributed life, the real choice, when one occurs, is between consistency and availability.

Reliability

Rated Empirical: grounded in studies or measurable evidence. The other 608.

Lineage
2002COINED
How it works

How does The CAP Theorem work?

When no partition exists, a system can deliver both consistency and availability. When a network partition cuts the system in two, it faces a forced choice: either refuse operations on the unreachable side, sacrificing availability to keep data consistent, or keep serving on both sides, sacrificing consistency to stay available. Partition tolerance is not really optional for a genuinely distributed system, so the design decision is what to do during a partition, not whether to tolerate one.

Figure illustrating The CAP Theorem
The CAP Theorem — JamieMcCarthy · CC BY-SA 4.0 · source
Where you'll see it

What are examples of The CAP Theorem?

Consistency-first systems Stores that refuse to serve stale or divergent data during a partition, favouring consistency over availability, such as systems built around a single authoritative master.
Availability-first systems Stores descended from Amazon's Dynamo design, like Cassandra and DynamoDB, keep responding during a partition and reconcile afterward through eventual consistency, favouring availability.
Tunable in one product Cassandra and DynamoDB offer tunable consistency, so a single system can be operated at different points on the spectrum: reinforcing that the fixed two-of-three picture oversimplifies.
Types & variants

What are the types of The CAP Theorem?

The PACELC theorem§

Abadi's extension: if there is a partition, trade availability against consistency; else, even in normal operation, trade latency against consistency (capturing the latency dimension CAP ignores).

Eventual consistency§

The relaxed model typical of availability-first systems, where replicas are allowed to diverge during a partition and converge once it heals.

Why it matters

Why does The CAP Theorem matter?

It is the organising principle of distributed database design, forcing architects to confront an unavoidable trade-off and to decide, in advance, how their system should behave when the network fails. It named the tension at the heart of every replicated data store and shaped a generation of NoSQL systems.

Working with it

How do you apply The CAP Theorem?

  • Plan for the partition — decide in advance whether your system should sacrifice consistency or availability when a network partition strikes.
  • Treat partition tolerance as mandatory — for any real distributed system, assume partitions will happen and design for them rather than pretending to avoid them.
  • Remember normal operation is different — recognise that outside a partition you can have both consistency and availability, and the trade-off then becomes latency versus consistency.
Where it breaks down

What are the limits of The CAP Theorem?

The formal impossibility result is a proven theorem, but the popular 'pick two of three' slogan is widely considered misleading: including by Brewer himself in his 2012 retrospective. The consistency-versus-availability choice only arises during a partition; when the network is healthy, a system can have both. Partition tolerance is effectively mandatory, so giving it up is not a real option for a distributed system. Availability is a spectrum and consistency comes in degrees, and the choice can vary by subsystem or even by operation. CAP also says nothing about latency, which the PACELC extension addresses. Its consistency, meaning linearizability, is also not the consistency of database ACID.

What it doesn't say

What are common misconceptions about The CAP Theorem?

It does not mean you permanently pick two of three properties and forever forgo the third: the trade-off bites only during a partition, and in normal operation you can have both consistency and availability. And 'CA' is not a meaningful choice for a real distributed system, since partitions cannot be wished away.

Is it real?

Is The CAP Theorem real?

Yes, as far as the evidence goes. The CAP Theorem is rated Empirical here: it rests on studies or measurements rather than on a saying.

Rated from two sources. 609 of the 1,116 entries carry this rating. How the scale works.

Occasionally printedin printed books: one of 240 names in its band, of 903 measured
36 of 69entries in software & systems carry the same rating

The best-known laws are the least likely to rest on measurement.

Origin

Where did The CAP Theorem come from?

Conjectured by Eric Brewer in a 2000 keynote and proved by Seth Gilbert and Nancy Lynch in 'Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services' (ACM SIGACT News, 2002); Brewer clarified the oversimplified reading in a 2012 retrospective.

How the name spread

When did people start saying “The CAP Theorem”?

1800coined 20022019
How often “CAP Theorem” appears in printed English, which takes hold around 2008 and peaks around 2018. Coined 2002 and in print by about 2008, unusually close together. This still charts the phrase rather than the idea. Source: Google Books Ngrams.
Known elsewhere as

What is The CAP Theorem called in other languages?

  • Arabicنظرية كاب
  • GermanCAP-Theorem
  • Spanishteorema CAP
  • Frenchthéorème CAP
  • Italianteorema CAP
  • JapaneseCAP定理
  • PortugueseTeorema CAP
  • RussianТеорема CAP
  • ChineseCAP定理

9 languages, as recorded on Wikidata. These are names the idea already goes by, not translations we made. The whole index by language.

Sources

Sources & further reading

  1. 1CAP theorem, Wikipedia. — the three guarantees, the Gilbert-Lynch proof, and Brewer's 2012 clarification.secondary
  2. 2Brewer, "CAP Twelve Years Later: How the 'Rules' Have Changed," IEEE Computer (2012). — why the two-of-three framing misleads and the choice only bites during a partition.primary

Everything above traces to en.wikipedia.org and ieeexplore.ieee.org, two sources in all, one of them the original publication rather than an account of it. Nothing is written from memory, and the method is written down. Spot an error or a better source? Suggest a fix.

What we checked

  • 1,116entries in the tomeListed one by one on the browse page.
  • 1,116of them citing a sourceOpen any entry: its sources sit at the foot of the page.
  • 2,489source references in allEach is named, and linked wherever the source is online.