CAP Theorem
The CAP theorem states a distributed data store can only provide two of three guarantees: Consistency, Availability, and Partition Tolerance.
Consistency
Every read receives the most recent write or an error. All nodes see the same data at the same time — no stale reads.
Availability
Every request receives a non-error response, even if one or more nodes are down. The system always answers.
Partition Tolerance
The system continues to operate despite network partitions — messages dropped or delayed between nodes.
The trade-off
Since partitions are inevitable in real networks, you must choose between CP (consistent under partition) and AP (available under partition). There is no CA system in a distributed world.