The replica lag surprise
In a system with one primary for writes and several read replicas, replicas lag slightly behind. A user updates their profile, the write lands on the primary, but their next read hits a stale replica and shows the old value. They think the save failed.
The guarantee
Read your own writes consistency promises that after a user makes a change, that same user will always see at least their own change on subsequent reads. Other users may still see old data briefly, but the author never does.
How to provide it
- Route a user's reads to the primary for a short window after they write.
- Track the write position and only read from a replica that has caught up to it.
- Pin the user's session to a replica known to be current.
Key idea
Read your own writes guarantees a user always sees their own recent change by routing their reads to the primary or to a replica that has caught up to that write.