The Read-Your-Writes Consistency Pattern: Letting Users See Their Own Changes

2026-06-10

Eventual consistency is fine — until a user updates their profile photo, refreshes, and sees the old one. They don't care that the replica will catch up in 200ms. They think your app is broken. Read-your-writes consistency guarantees that after a client writes a value, subsequent reads from that same client will see the write (or a later version of it). Other clients may still see stale data; that's the trade-off that keeps it cheap.

The problem: in a replicated database, writes go to the primary (or a leader replica), but reads are spread across followers for scale. Replication lag is usually milliseconds, but it's never zero. A user who just posted a comment and gets routed to a lagging follower sees their own comment missing.

Three practical implementations:

Real-world example: Facebook's TAO system serves the news feed from eventually-consistent followers, but after you post a comment, your client gets a "read-your-writes" token. For the next few seconds, your reads bypass the cache and hit the primary. Other users still read from followers — they see your comment whenever replication catches up. You always see it instantly.

Rule of thumb: if your replication lag p99 is L milliseconds, give the read-from-primary window a duration of at least 2L. With a typical 50ms p99 lag, a 100–200ms window covers nearly all cases without hammering the leader.

Watch out for: cross-device reads. A user writes on their phone, opens their laptop, and expects to see the change. Session-based stickiness fails here. If this matters, use write-LSN tracking stored server-side against the user ID, not the session.

Read-your-writes is the consistency model users actually feel. Strong consistency is invisible when it works; eventual consistency is invisible most of the time and infuriating the rest. Read-your-writes targets the one case users notice — themselves.

See it in action: Check out Look at People’s Patterns of Behavior I Robert Greene by Robert Greene to see this theory applied.
Key Takeaway: Users tolerate stale data about others, but not about themselves — read-your-writes gives you cheap eventual consistency everywhere except where it would feel broken.

All newsletters