Verified Jobs Live
Database Medium Level ~3 min read

Why can a replica return stale data immediately after a successful write?

Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Model Answer & Deep-Dive Explanation

Many replication designs apply changes to replicas asynchronously, so a committed primary write may not yet be visible there. A user who creates a record and immediately reads from a replica can see an older state. Possible policies include reading critical follow-up operations from the primary, tracking a replication position, or using an appropriate consistency guarantee supported by the system. Measure lag and define user-facing expectations. Replication improves particular availability or scaling properties, but does not automatically provide read-your-writes consistency or replace backups.