Database Engineering · Scaling the database
Replication and read replicas
Replication keeps live copies of a database on other servers. The copies survive a failure and can answer reads, but they trail the primary slightly, so a read can return old data.
- Time17 min
- LevelDeveloper
- Experiments2 live
- Check6 questions







Meera saves a new address; the app sends the UPDATE to the primary.
WAL stream the log record travels to each replica, usually within milliseconds.
Next page load reads from the replica and sees the new address, if replay finished.
Caught-up replica one that has replayed past this user's last write.