Java Zero to All All questionsPractise free
Interview questions › System Design › Scalability Fundamentals

You add read replicas and a user reports they don't see their own write. What's happening and how do you fix it?

Level III · MidScalability Fundamentals
Short answer

This is the read-your-writes anomaly caused by asynchronous replication lag: the write committed on the primary but the read hit a replica that's milliseconds-to-seconds behind.

Explanation

Fixes include routing a user's reads to the primary for a short window after their write (sticky-to-primary), reading from the primary inside the same logical operation, or using replica lag-aware routing that only serves replicas caught up past the write's LSN/GTID. Reporting and non-critical reads can still hit replicas freely.

Common mistakes
  • Saying replicas are always in sync.
  • Not offering read-your-writes routing for the user who wrote.

Can you say this out loud in two minutes? Drill it in a timed mock interview, with flashcards and runnable code for Scalability Fundamentals.

Practise free

More on Scalability Fundamentals