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 reject reads or writes that cannot be confirmed consistent across the partition. They preserve correctness at the cost of availability.
- AP systems continue serving reads and accepting writes, even if some nodes are cut off. They preserve availability at the cost of potentially returning stale data.
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:
- HBase and Google Spanner (linearizable reads require quorum)
- ZooKeeper and etcd (used for distributed coordination)
- Raft-based consensus systems, including the lease service described in the deep-dive below
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:
- Amazon DynamoDB (in its default eventual consistency mode)
- Apache Cassandra
- CouchDB
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:
- why P is not optional in real distributed systems
- what CP and AP mean during a partition, with real examples
- that most systems are tunable, not binary
- that PACELC extends the model beyond the partition-only case
- how this connects to eventual consistency, quorum reads, and consistency levels
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.