March 2026 • Rich Robertson

What Is the CAP Theorem? (Explained Simply)

CAP states that a distributed system cannot simultaneously guarantee consistency, availability, and partition tolerance. It is one of the most widely cited trade-off frameworks in distributed systems, and understanding it clearly — beyond the surface-level "pick two" framing — is what separates a good answer from a great one in interviews.

The Three Properties

Consistency (C) means every read returns the most recent write or an error. All nodes in the system see the same data at the same time. This is sometimes called linearizability or strong consistency.

Availability (A) means every request receives a response — not necessarily the most recent data, but always some response. No node is allowed to refuse or time out indefinitely.

Partition Tolerance (P) means the system continues to operate even when network partitions occur — that is, when some nodes cannot communicate with others due to a network failure.

Why You Can Only Have Two (and Why P Is Not Really Optional)

The theorem says you can only guarantee two of the three at once. In practice, however, network partitions are a reality in any distributed system. You cannot simply opt out of them. This means partition tolerance is not a choice — it is a constraint.

The real trade-off, then, is between C and A during a partition:

CP Systems: Correctness Over Availability

CP systems refuse to answer rather than risk returning wrong data. If a majority quorum cannot be reached, the operation fails or blocks until the partition heals.

Examples include:

These are the right choice when your data must be correct: financial accounts, distributed locks, configuration that controls critical behavior.

AP Systems: Availability Over Correctness

AP systems continue responding during a partition, accepting that different nodes may temporarily return different values. After the partition heals, they reconcile.

Examples include:

These are the right choice when availability matters more than perfect accuracy: product catalogs, social counters, user preferences, recommendation lists.

Where the "Pick Two" Framing Misleads

CAP is often presented as a design choice you make once upfront. In reality, most modern systems are tunable. DynamoDB and Cassandra let you choose consistency level per operation — QUORUM reads give you stronger guarantees at higher latency cost; ONE reads are faster but may return stale data. The CAP trade-off is not a fixed setting; it is a dial you turn depending on the read path.

CAP also only describes behavior during a partition — a relatively infrequent event in well-operated clusters. During normal operation, PACELC theory argues that the more relevant trade-off is between latency and consistency even when no partition is occurring.

What Interviewers Are Looking For

The weak version of a CAP answer names the three properties and says "pick two." The strong version explains:

What to Read Next

For a broader view of my distributed systems engineering work, see Distributed Systems Engineering: Correctness, Coordination, Reliability.

CAP is closely tied to consistency models. For the practical side of eventual consistency, see What Is Eventual Consistency? (Explained Simply). For a modern systems framing of assumption failures that show up around CAP trade-offs, read The Fallacies of Distributed Computing Still Break Modern Systems. For a real-world CP system built on Raft, see Designing a Correct Distributed Lease Service: Tenure on Raft and the protocol comparison in Raft vs Paxos vs EPaxos: A Practical Guide.