Slaves can be used for:
- Horizontal read scalability — take the load off a master database by spreading reads to a replicated slave.
- Disaster recovery — some disasters, such as a hardware failure, can be solved by having a slave ready to propagate to a master. This technique also works to make offline changes to a master/slave pair without having database downtime (see below).
- Consistent Backups — without disrupting production usage, a
slave can be used to take a consistent backup by stopping the
database and copying the database files. This is a free and
uncomplicated way to get consistent backups (innodb hot backup is
not free, and using a snapshotting tool (such as LVM’s snapshot
capability) can be complex. Not everyone wants to manage
snapshots.)
Be careful when using a slave for more than one purpose. Using a slave for more than one purpose can be done, but carefully. For …
[Read more]