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?

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.

Further reading

Problem with a question

Engineering Decisions · Senior · question 7

Test yourself

Take the Engineering Decisions · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz