Overview - Database replication (master-slave)
What is it?
Database replication (master-slave) is a way to copy data from one main database called the master to one or more copies called slaves. The master handles all the writes and updates, while slaves keep copies of the data to help with reading. This setup helps spread the work and keeps data safe if one database fails. It is like having a main notebook and several copies to share with friends.
Why it matters
Without replication, a single database can become slow or stop working if too many people use it or if it crashes. Replication helps by sharing the load and making sure data is not lost. This means websites and apps stay fast and reliable, even with many users or problems. Without it, users would face slow responses and data loss risks.
Where it fits
Before learning this, you should understand basic databases and how data is stored and retrieved. After this, you can learn about more advanced replication types like multi-master or distributed databases, and how to handle conflicts and scaling in big systems.