Engineering Decisions · Senior · Question 7 of 14
Reads go to replicas that lag by about a second. Users complain that their just-saved profile shows old data, while others seeing it a second late is fine. What do you do?
- 1Make replication synchronous for all replicas
- 2Route that user's reads to the primary briefly
- 3Send every read in the system to the primary
Show the answer
Correct answer: Route that user's reads to the primary briefly
Explanation
Pinning only the author to the primary for a moment fixes read-your-writes and keeps replicas serving everyone else. Synchronous replicas fit data where nobody may ever see old values, but every write would pay that latency. Reading only from the primary fits a small system, and here it would remove the capacity the replicas were added for.