CAP Theorem Explained: Why Distributed Systems Must Choose Between Consistency and Availability
The CAP theorem, formally proven by Gilbert and Lynch in 2002, states that a distributed system cannot simultaneously guarantee linearizable consistency, full availability, and partition tolerance. Since network partitions are inevitable in real-world systems due to hardware failures, GC pauses, and link drops, partition tolerance is effectively a mandatory constraint rather than a choice. The real design decision is whether a system sacrifices consistency or availability when a partition occurs, and making the wrong choice can cause issues like double charges or unnecessary downtime. CP systems such as etcd use quorum-based writes and refuse requests when quorum is lost, while AP systems like Cassandra allow writes during partitions and resolve conflicts after healing. Brewer himself clarified in 2012 that CAP trade-offs apply per operation, not per system, meaning a single service can be CP for payments and AP for less critical operations like view counts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in