CAP theorem
Definition
The CAP theorem states that a distributed data store cannot be both linearizable (C) and available to every non-failed node (A) while a network partition (P) is happening.
In practice
Partitions happen, so the real choice is what to do during one. A CP system (etcd, ZooKeeper, a consensus-backed database) rejects requests on the minority side to keep one consistent history. An AP system (Cassandra or Dynamo-style stores with low quorums) keeps answering on both sides and reconciles conflicts afterwards.
CAP is often over-applied. It says nothing about the normal case without partitions, where the trade-off is latency (see PACELC), and its C and A are narrow formal definitions. Many systems are neither strictly CP nor AP, and the choice can differ per operation: a shop can stay available for carts but consistent for payments.
Example
During a 2-minute partition, a CP inventory store returns errors for writes on the minority side, while an AP shopping-cart store accepts adds on both sides and merges the carts when the link returns.