Pick the fix
Users post a comment, the page reloads from a read replica, and the comment is missing for a second. Cheapest fix?
Hint 1 of 1
Which guarantee does the user actually need?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Read that user's data from the primary for a few seconds after they write
Correct. Gives read-your-writes where it matters without making every read strongly consistent.
Read-your-writes is the guarantee users notice: they expect to see their own comment. Sending only that user's reads to the primary for a short while fixes it without slowing every write.
Why not the others?
- B Make all replicas synchronous. Fixes it at a large latency and availability cost for every write.
- C Add a CDN. A cache makes staleness worse.
- D Switch to eventual consistency. That's what you already have.