DISTRIBUTED SYSTEMS & ARCHITECTURE · SUBTOPIC
Linearizability, Causal & Read-Your-Writes
Match user expectations without paying unnecessary global consensus costs.
AdvancedPart of Consistency Models
Subtopics in Consistency Models (2)
In plain words
Linearizability means everyone on Earth sees every update in the exact same real-time order. Read-your-writes simply promises YOU always see your own edits right away, even if friends see them a second later.
Think of it like…
Editing your own social bio: you expect to see your new bio immediately (read-your-writes), while someone across the world seeing it 2 seconds later is totally fine.
Loading interactive diagram
Loading interactive exercise
Theory & how it works
Monotonic reads & Causal ordering
Monotonic reads ensure time never appears to go backward for a user (pinned to one replica so you don’t read a newer replica then an older one). Causal consistency ensures replies appear after parent comments using version vectors or Lamport clocks.
Key points & practical guide
Summary checklist
- Linearizability = real-time single-copy illusion (consensus)
- Read-your-writes = route user’s own post-edit reads to primary or pass a session LSN token
- Causal = preserves cause-and-effect without full global locks
When to use it
- Social feeds, profile updates, multi-replica SQL apps
Watch out for
- Users refreshing after saving a form and thinking their save failed because a slow replica answered
Quick check
Loading quiz