Skip to main content
CAP Theoremlesson 1 of 4 · 2 min read

What C, A, and P Actually Mean

Consistency

Consistency in CAP means linearizability: every read returns the most recent completed write, as though only one copy of the data existed. Once any client has seen a value, no client may later see an older one.

It is not the C in ACID, which is about integrity rules inside one database. Two fields, the same letter, different meanings, and interviewers enjoy probing exactly that.

Availability

Availability means every request to a working node gets a real answer rather than an error, with no promise that the answer is current. The formal version is stricter than saying the site is up. If your node returns an error, or refuses because it cannot confirm it holds the latest value, it counts as unavailable here.

Partition tolerance

Partition tolerance means the system keeps working when messages between nodes are delayed or lost. A partition is not a machine crashing. It is the network splitting into groups that cannot reach each other while every machine inside each group runs perfectly. A failed switch, a misconfigured firewall, an overloaded link between regions, a cut cable: all of them produce partitions, and all of them have taken down famous systems.

Why pick two misleads

See why pick two misleads. Partition tolerance is not something you can decline, because you cannot stop a network from failing. Refusing to tolerate partitions only means your behaviour during one is undefined, which is worse than choosing.

Your real branch is what happens when the partition arrives. A single database on one machine avoids the question entirely, and that is a legitimate answer at moderate scale. The moment your data lives on two machines, you have signed up to answer it.

the shape of it
Irelandprice = 30Virginiaprice = 25, staleReaderasks Virginialink downwhat is the price25, or refuse
step 1 of 3
With the link down, Virginia can answer wrongly or not answer. The right value is on the far side of the break.

Worked example

Two replicas of a session store run in different racks, and a switch firmware bug cuts the link between them at 14:02 while both keep serving their local clients. At 14:03, Grace's request lands on replica A and updates her cart to 3 items. At 14:04, her next request happens to route to replica B, which never heard about the update and still shows 2 items. Nothing crashed, no process died, every health check on both machines is green. The system has silently stopped being consistent, and it never chose to; it just never decided what a replica should do when it cannot confirm it has the latest data. CAP is the demand that you decide this before 14:02, not after.