What is CAP Theorem?
The principle that a distributed data store facing a network partition must sacrifice either consistency or availability.
Definition
Eric Brewer's CAP theorem states that when a network partition splits a distributed system, it must choose between consistency (every read sees the latest write) and availability (every request gets a response). Partitions are unavoidable in real networks, so the choice is really C-versus-A during failure. CP systems like ZooKeeper and etcd refuse requests on the minority side of a partition; AP systems like Cassandra and DynamoDB keep serving, accepting temporary divergence. The PACELC refinement adds that even without partitions, systems trade latency against consistency. CAP frames design discussions; real databases sit on a spectrum, not at corners.

