3.3. Consistency Models
A consistency model is a contract about what a read is allowed to return in the presence of concurrent writes and replication. This is the most misunderstood topic in distributed systems, largely because the same word — “consistency” — means different things in CAP and in ACID. This chapter builds the spectrum rigorously, anomaly by anomaly: from linearizability (behaves like a single copy, at the highest coordination cost) down through causal and eventual consistency, with CAP and PACELC as the theorems that explain why you cannot simply have it all.
Topics Covered
Section titled “Topics Covered”- 3.3.1. Linearizability: The Strongest Guarantee, the Highest Cost: Defines the strongest single-object guarantee, where the system behaves as one copy, at the highest coordination cost.
- 3.3.2. Serializability: Transaction Isolation: Covers the strongest multi-object isolation, where concurrent transactions appear to execute in some serial order.
- 3.3.3. Weak Isolation and MVCC: Read Committed, Snapshot Isolation, Write Skew: Explains read committed, snapshot isolation, and MVCC, and the write-skew anomaly that snapshot isolation permits.
- 3.3.4. CAP Theorem: CP vs. AP Systems: Clarifies the CAP theorem and the real choice it forces: consistency or availability during a network partition.
- 3.3.5. PACELC Theorem: The Latency-Consistency Trade-off: Extends CAP with PACELC, exposing the latency-versus-consistency trade-off that exists even without a partition.
- 3.3.6. Causal Consistency and Session Guarantees: The Middle of the Spectrum: Covers causal consistency and session guarantees, the practical middle ground between strong and eventual.
- 3.3.7. Eventual Consistency: Last Write Wins (LWW) and Its Weaknesses: Explains eventual consistency, last-write-wins conflict resolution, and the silent data loss LWW can cause.
- 3.3.8. CRDTs: Conflict-free Replicated Data Types: Introduces conflict-free replicated data types that merge concurrent updates deterministically without coordination.