We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Consistency Models
Free preview: the first 2 parts of this 8-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Consistency Models
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
You update your username from "alice" to "alice_dev", then update your profile picture. If these writes land on different replicas in different order, some users see the new picture with the old username.
Monotonic writes guarantee that writes from a single client are applied in order. Write A before B means every replica applies A before B. In multi-master or leaderless systems, this is not guaranteed by default.
Write ordering can be enforced by:
Single leader, all writes go through one node that serializes them. Simple but creates a bottleneck.
Session-based write routing, route all writes from one session to the same node. That node applies them sequentially.
Lamport timestamps, attach logical timestamps to writes. Replicas apply writes in timestamp order.
| Approach | Ordering Guarantee | Impact |
|---|---|---|
| Single leader | Total order | Bottleneck |
| Session routing | Per-session order | Moderate |
| Logical timestamps | Causal order | Minimal |