The CAP theorem says that a distributed data store can provide at most two of three guarantees at once: Consistency, Availability, and Partition tolerance. Since network partitions cannot be ruled out, the real choice during a partition is between consistency and availability.
Why it matters
CAP frames the design trade-offs behind distributed databases. A system that favors consistency (CP) may reject requests while a partition lasts. One that favors availability (AP) keeps answering but may return stale or conflicting data that must be reconciled later. Normal operation without a partition can offer both, so CAP describes behavior under failure.
Example
Two data centers lose their link.
CP choice: the minority side refuses writes -> consistent, less available
AP choice: both sides accept writes -> available, may diverge
Common mistakes
- Reading it as "pick any two" at design time. Partition tolerance is not optional in a distributed system.
- Labeling a whole database CP or AP when many systems let you tune this per operation.
- Mixing up CAP consistency with the "C" in ACID, which concerns constraints.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.