Consistency Models and Quorums
Consistency is an operation-level promise about what callers observe after concurrent updates and failures.
Consistency Models and Quorums
Consistency is an operation-level promise about what callers observe after concurrent updates and failures. Linearizability respects real-time order of completed operations. Sequential consistency preserves a single order but not necessarily real-time order. Causal consistency preserves happens-before dependencies. Eventual consistency promises convergence if updates stop and propagation succeeds. Quorum arithmetic such as W + R > N can imply intersection under a simple fixed-replica model, but is not a complete proof of linearizability.
Mechanism and worked example
With N=3, W=2 and R=2, read and write quorums intersect in at least one replica under the simple model. Concurrent writes still need version ordering or conflict resolution. Sloppy quorums, hinted handoff, membership changes and stale replicas alter the reasoning.
| Model | Guarantee | Example |
|---|---|---|
| Linearizable | Real-time order | Balance or inventory ownership |
| Causal | Preserve causal dependencies | Collaborative edits |
| Eventual | Replicas converge | Feed/search projection |
| Session | Read-your-writes or monotonic reads | User continuity |
Failure modes and operations
A replica may acknowledge receipt before durable flush or application. Read repair can discover divergence but does not make every read linearizable. Clock timestamps can tie or move backward. During partitions, accepting writes on both sides can create conflicts.
Trade-offs and design boundary
Linearizable writes simplify invariants but can increase latency and reduce availability across regions. Eventual or causal models improve local responsiveness but shift complexity to clients and conflict resolution. Quorum settings are implementation controls, not the consistency contract.
Interview transfer exercise
Can a read quorum followed by an independent write safely reserve the last seat? No: two callers can both read availability. Use an authoritative conditional write or serializable transaction.
Read the diagram
Write reaches required quorum → Read queries a quorum → Intersection may reveal a version → Conflict policy resolves concurrent writes
Can a read quorum followed by an independent write safely reserve the last seat? No: two callers can both read availability. Use an authoritative conditional write or serializable transaction.
Your design draft
Clarify assumptions, explain your approach, and test the difficult cases. Save your draft, then compare it with the study notes.
Self-review checklist
Self-guided practice. Automated AI feedback and code execution are not connected.