Skip to main content

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​

ChapterFocus
CAP TheoremConsistency vs availability under partition
PACELCLatency vs consistency when not partitioned
LinearizabilityStrongest single-object guarantee
Sequential ConsistencyPer-process program order preserved
Causal ConsistencyHappened-before without global order
Eventual ConsistencyConvergence without real-time guarantees
Session GuaranteesRead-your-writes, monotonic reads
Quorum SystemsR + W > N, read repair, sloppy quorums

Learning Path​

  1. CAP and PACELC — frame every consistency discussion.
  2. Linearizability through Eventual — know the spectrum and when each applies.
  3. Session Guarantees — what users actually experience in practice.
  4. Quorum Systems — connect to DynamoDB, Cassandra, and leaderless replication.

Interview Prep​

ResourceTopic
Amazon DynamoDB ConsistencyTunable reads, GSI lag
Google SpannerExternal consistency
Lab 004 quorum KVQuorum replication on :8095
Lab 005 eventual consistencyConvergence 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 hereWhat you practice
Chapter §22A / §22B (where present)Ship-ready LLD + drill catalog
Chapter §23 PRACTICEFull interview script
Curriculum Overview — Phase 7Rollout status

Next Domain​

Continue to Transactions and Distributed Databases.

Return to the Curriculum Overview for the full learning path.