All labs
Lab 28
Database Scaling

Strong vs Eventual Consistency

A payment balance needs the latest truth; a feed like-count can lag a moment. Toggle between strong and eventual consistency and watch freshness trade against speed and availability.

Same write, two guarantees. Toggle the mode, optionally knock a replica offline, then write a new value and watch when each node reflects it — and at what cost.
🗄️
Primary
v1
fresh
📄
Replica 2
v1
fresh
📄
Replica 3
v1
fresh
 
Strong
Eventual
Read freshness
Always latest
May be stale briefly
Write latency
Higher (waits for replicas)
Low (acks immediately)
Availability on node loss
Write refused
Stays available
Use for
Payments, balances, inventory
Feeds, likes, view counts, search
What just happened