It is a strategy where a single Master Database and one or multiple Slave Database exist, inside of master database the Create, Update & Delete operation will happen and inside of slave database Read operation will happen. Slave Databases contain the copied data from Master Database.
In the picture you can see one Master Database and two Slave Databases. Master Database is doing Insert, Update & Delete operations and Slave Databases Read operation.
Benefits of Database Replication,
- Performance: Since the read operation happens inside slave databases so there can be multiple read operations happen parallely. Which will eventually improve performance.
- Reliability: If data lost from one database server we can get the data from another server. No chance of data loss.
- Availability: If data lost from one database server we can get the data from another server, with this we can make our system available.
- Reduce Latency: We can reduce latency if the Slave Database geographically closer.
Fact, if the Master Database fails, a Slave Database will replace the failed Master Database. Later the new Slave Database will be created and will replace the old Slave Database.