< Day Day Up > |
MySQL's replication features allow you to quickly and easily spread your processing load among multiple database servers. This chapter focuses on the performance aspects of replication. It begins by briefly explaining how this vital technology works, along with some tips you can use to decide if replication is right for you. Next, you examine several replication scenarios, starting with several very basic topographies, and then explore how these can scale to more complex configurations. Finally, this chapter discusses how to optimize your replication performance. Entire books have been written on distributed computing, load balance, and database replication theory and topographies. However, the purpose in this chapter is simply to
This chapter avoids the intricacies of initial setup and customization, except in those situations in which these decisions might have an impact. How Does Replication Work?Replication is actually quite straightforward. At its core, it merely involves an administrator picking a server to act as the master, and then registering one or more slave servers to receive updates from the master. Each slave server is responsible for contacting the master server. This master server records all data manipulation statements in a binary log, which is then fed in a stream to any slave(s) that contact the master. The slave computers then play back these statements locally, thus updating their own data copies accordingly. In addition, a slave can, in turn, act as a master to other servers. This lets you construct sophisticated chains of replication servers. Obviously, there are many steps to follow to correctly configure and use replication, but the preceding discussion describes it accurately at a high level. Is Replication Right for You?Replication is a wise strategy if any of the following are relevant in your MySQL environment:
|
< Day Day Up > |