Track · 2:12 · Liner note

The Replication Lag

Replication lag is the delay between a change being written to a primary database and that change appearing on its replica, which can make read replicas briefly serve stale data.

You write a row, read it back from a replica and find nothing. The row exists; it just has not traveled yet. The replication lag is the gap between the primary’s commit and the replica’s copy, usually milliseconds and occasionally minutes.

Treat it as a monitored number, not a surprise. Alert on lag, route read-your-own-writes to the primary and tell downstream pipelines which timestamp to trust. Reports built on replicas should state their freshness. Lag is harmless once you account for it, and expensive when you pretend it is zero.