The promise
Read after write consistency, also called read your writes, guarantees that after a user submits a write, any later read by that same user reflects it. It says nothing about what other users see.
This matters because the most jarring anomaly is updating your profile, reloading, and seeing the old version because the read hit a lagging follower.
How to provide it
Several techniques deliver this guarantee:
- Read from the leader for data the user can edit. A user reads their own profile from the leader but reads others from followers.
- Track a timestamp of the user's last write and only route their reads to followers that have caught up to that point.
- Remember recent writers and send their reads to the leader for a short window after they write.
The cross device wrinkle
If the same user acts from a phone and a laptop, the system may need a centralized record of their last write, since the two devices cannot compare notes directly.
Key idea
Read after write consistency ensures a user always sees their own latest write, usually by routing their reads to a sufficiently fresh replica.