Definition
Replication lag is the time gap between a write committing on a primary database and that write being applied on its replicas. With asynchronous replication — the common default, chosen so writes do not wait on replicas — the lag is usually milliseconds but can stretch to seconds under load.
Its signature bug: a user updates their profile, the read after the redirect goes to a lagging replica, and they see their old data — a read-after-write anomaly. The standard fixes are read-your-own-writes routing (send a user's reads to the primary for a short window after they write), session tokens or log sequence numbers that let a replica prove it is caught up, or synchronous replication for the few paths that truly need it (at a write-latency cost).
How it comes up in interviews
Adding read replicas to a design invites exactly this follow-up: "user writes then immediately reads — what do they see?" Interviewers want the anomaly named and a targeted fix (read-your-own-writes), not a blanket retreat to synchronous replication everywhere.