Read Replicas Boost Database Speed but Can Serve Stale Data to Users
Adding a read replica to a database offloads traffic from the primary server and improves read performance, but introduces replication lag that can range from milliseconds to minutes. During this lag window, users may see outdated information — such as a profile update not reflecting immediately or an order status showing as pending after payment. This occurs because replicas apply changes only after they have committed on the primary, a behavior known as a read-after-write violation. Replication lag is not a fixed, predictable value; it varies based on write load, long-running queries, large transactions, and maintenance activity. Engineers are advised to route consistency-sensitive reads — such as balance checks, order status, and post-write fetches — directly to the primary rather than treating all reads as safe to serve from a replica.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in