← Lessons

quiz vs the machine

Silver1070

Databases

The CAP Theorem Revisited

When a network partition splits your nodes you must choose between staying consistent and staying available, and nothing lets you dodge that.

4 min read · intro · beat Silver to climb

What CAP Actually Says

CAP names three properties of a distributed store: Consistency, every read sees the latest write; Availability, every request gets a non error response; and Partition tolerance, the system keeps working when messages between nodes are lost. The theorem says that during a partition you can hold at most two of the three.

The Forced Choice

Partitions are not optional in a real network, so partition tolerance is a given. The real decision shows up only when a partition happens:

  • A CP system refuses some requests to avoid serving stale or conflicting data.
  • An AP system answers every request even if different nodes disagree for a while.

When there is no partition a system can be both consistent and available, so CAP is a constraint about failure, not normal operation.

A Common Misreading

CAP is not a permanent label that picks two letters forever. The same store can favor consistency for one operation and availability for another. The honest framing is per request behavior under partition, not a slogan.

Key idea

CAP forces a choice only during a partition, where you trade consistency against availability one request at a time rather than once forever.

Check yourself

Answer to earn rating on the learn ladder.

1. When does the CAP tradeoff actually force a decision?

2. What does an AP system do during a partition?

3. Why is calling a database simply CP or AP often misleading?