Practice this topic in a realistic system design interview
Suppose an application stores all of its data on a single database server. At first, this may work perfectly well.
But that database becomes a critical dependency. If the server fails, the application may lose access to its data. And as traffic grows, that one database may also struggle to handle every read and write request.
One way to improve this is to maintain additional copies of the database on other machines. If one server becomes unavailable, another copy may be able to take over. And if the application receives a large amount of read traffic, some of those reads can be distributed across the copies.
That is the basic idea behind database replication.
This chapter covers what replication is, why systems use it, and the trade-offs that come with keeping copies of the same data on multiple database servers.