Consistency Models
Linearizability, eventual consistency, CAP, PACELC, quorums, and session guarantees.
Figure: Consistency model spectrum — stronger models imply more constraints.
What You'll Learn
Consistency is not one thing — it is a menu of guarantees with different latency and availability costs. You will be able to choose the right model for a workload, explain CAP and PACELC without oversimplifying, and design quorums for read/write tradeoffs.
Chapters
| Chapter | Focus |
|---|---|
| CAP Theorem | Consistency vs availability under partition |
| PACELC | Latency vs consistency when not partitioned |
| Linearizability | Strongest single-object guarantee |
| Sequential Consistency | Per-process program order preserved |
| Causal Consistency | Happened-before without global order |
| Eventual Consistency | Convergence without real-time guarantees |
| Session Guarantees | Read-your-writes, monotonic reads |
| Quorum Systems | R + W > N, read repair, sloppy quorums |
Learning Path
- CAP and PACELC — frame every consistency discussion.
- Linearizability through Eventual — know the spectrum and when each applies.
- Session Guarantees — what users actually experience in practice.
- Quorum Systems — connect to DynamoDB, Cassandra, and leaderless replication.
Interview Prep
| Resource | Topic |
|---|---|
| Amazon DynamoDB Consistency | Tunable reads, GSI lag |
| Google Spanner | External consistency |
| Lab 004 quorum KV | Quorum replication on :8095 |
| Lab 005 eventual consistency | Convergence simulator on :8099 |
| Question | "What consistency model for a global notification system?" |
Prerequisites
Production readiness + Game Day
Every substantive chapter in this domain targets the Production LLD and Game Day Standard: whiteboard Production LLD (APIs, data, failure paths) and run Game Day drills (inject → detect → mitigate → verify → learn).
| Start here | What you practice |
|---|---|
| Chapter §22A / §22B (where present) | Ship-ready LLD + drill catalog |
| Chapter §23 PRACTICE | Full interview script |
| Curriculum Overview — Phase 7 | Rollout status |
Next Domain
Continue to Transactions and Distributed Databases.
Return to the Curriculum Overview for the full learning path.