CAP Twelve Years Later: How the "Rules" Have Changed (2012)
December 23, 2023The CAP theorem, coined by Eric Brewer, states that in a shared-data system, you can have either Consistency (C), Availability (A), or Parition tolerance (P), but not all three simultaneously. However, Martin Kleppmann challenges the CAP theorem and discusses its limitations in Designing Data-Intensive Applications, and A Critique of the CAP Theorem. In CAP Twelve Years Later: How the “Rules” Have Changed, Brewer clarifies that the notion of “2 of 3” is misleading. In practice, designers cannot forfeit P and have a choice between C and A.
The consistency of CAP is different from the that of ACID. The C in CAP is equivalent to having a single up-to-date copy of the data. The cosistency is referred as Lineariability in Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web, which proved the CAP theory in an ascynchronous network model.
The “2 of 3” view can be misleading. Firstly, there is little need to sacrifice consistency or availability when the system is not experiencing partitions, as partitions are rare. Secondly, consistency and availability are fine-grained properties that can vary based on specific operations or data. Finally they are not strictly binary options.
Partitioning is a continuous property that is related to both latency and network partitions. Managing partitions involves making decisions about detecting the start of a partition and network recovery. During the partition recovery process, techniques like version vectors and CRDTs can be used.