Whitepapers
15 items
15 items
The formal proof that distributed systems must choose between consistency and availability during network partitions
The CAP theorem proves that any distributed data store can provide only two of three guarantees: Consistency (every read receives the most recent write), Availability (every request receives a response), and Partition tolerance (the system continues operating despite network failures). Since network partitions are inevitable in distributed systems, the real choice is between consistency and availability during partitions. This fundamental result shapes every distributed database design.
CAP is not a guideline—it's a mathematical proof. No algorithm exists that can provide all three properties simultaneously. This isn't a limitation of current technology; it's a fundamental constraint of distributed computing.
Network partitions will happen: switches fail, cables are cut, datacenters lose connectivity. Any system spanning multiple nodes must handle partitions. The real choice is CP (consistency) or AP (availability) during partitions.
CAP's "consistency" means linearizability—the strongest form. Weaker consistency models (eventual, causal) can provide better availability. Many "AP" systems offer useful consistency guarantees short of linearizability.
In 2000, Eric Brewer presented a conjecture at the ACM Symposium on Principles of Distributed Computing (PODC). He claimed that any shared-data system can have at most two of three desirable properties:
Consistency (C): Every read receives the most recent write or an error. All nodes see the same data at the same time. This is linearizability—operations appear to happen instantaneously at some point between invocation and response.
Availability (A): Every request to a non-failing node receives a response, without guarantee that it contains the most recent write. The system remains operational.
Partition Tolerance (P): The system continues to operate despite arbitrary message loss or failure of part of the system. Network splits don't cause the system to fail entirely.
Brewer's claim was based on practical experience building large-scale systems at Inktomi. Two years later, Gilbert and Lynch formalized the conjecture and proved it mathematically.