![](https://csdnimg.cn/release/download_crawler_static/3987450/bg5.jpg)
Master Server Slave Server
Writes
Index &
Bin Log
Rotation
Writes
Reads
Possible Roles
• Fail over server
• Used for performing backups
• Read load balancing
• Additional slaves allow Scale-Out
BackupsBackups
Writes & Reads
Web/App
Server
Web/App
Server
ReplicationReplication
Figure 2
Although MySQL Replication can solve many high availability design issues in a simple and straight
forward manner, two problems inherent to the configuration do need to be addressed by developers
and/or administrators.
First, the application interacting with the databases must become “replication aware”. By this we mean
that the application must be coded to write only to the master and always read from the slave.
The second issue revolves around creating a strategy for initiating a fail over in the event of a hardware or
software problem on the master. Beyond that, there should also be a process for returning the system to
its original configuration before the failure.
Below in Figure 3 we illustrate how a fail over would likely be configured in a standard master to slave
configuration.
Copyright © 2006, MySQL AB Page 5 of 26