Last Minute Notes
  • Github
  • Docs
  • Learn
    @sayanstwt
Lessons
0/37 done
  • CAP & PACELC
  • Consistency Models
  • Time & Ordering
  • Consensus with Raft
  • Locks, Leases & Fencing
  • Isolation Levels & Anomalies
  • 2PC & Sagas
  • Idempotency & Exactly-Once
Learn/System Design/Distributed Systems

Consistency Models

8 min Intermediate 8 steps

Strong, read-your-writes, monotonic and eventual, shown with real reads.

Replica
behind
Your post
on primary
YouPrimaryReplicawrite post
request reply failure
In this lessonStep 1 of 8
  1. The problem
  2. Linearizable
  3. Sequential
  4. Causal
  5. Monotonic
  6. Read your writes
  7. Eventual
  8. Recap
Step 1 / 8problem

Your own post is missing

You write to the primary and get ok. Your next read goes to a replica that has not received the write yet.

You refresh and your post is gone. Nothing is broken: the replica is just behind.

Key idea

With replicas, "what will a read return?" has many possible answers. A consistency model says which ones are allowed.

←→ step·R replay·Space pause

You'll learn

  • Why replication lag breaks what users expect
  • Linearizable, sequential and causal guarantees
  • Make read-your-writes work with replicas
  • When eventual consistency is enough
Read the full notesSystem Design Fundamentals, 9