The CAP theorem, also called Brewer's theorem, is an impossibility result for distributed computing. In an asynchronous network that can lose messages, a replicated read/write data object cannot guarantee both strong consistency and availability in every execution (Gilbert and Lynch 2002). The letters CAP stand for consistency, availability, and partition tolerance.
Here, consistency requires operations to behave as if performed on a single copy in a total order that respects real-time precedence. Availability requires every request received by a non-failing node eventually to receive a response. Partition tolerance allows communication between groups of nodes to fail indefinitely.
For example, suppose a network partition prevents communication between two groups. Availability requires a write changing the stored value in the first group to complete and a subsequent read in the second group to return. The second group cannot distinguish this execution from one in which the write never occurred, so it cannot guarantee the consistent result.
The theorem is often summarized as "choose two of three," but the tradeoff concerns guarantees during partitions, not an unconditional prohibition on providing consistent and available service when communication works normally.