< 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

  1. Describe scenarios in which replication might help improve your MySQL performance.

  2. Understand how to tune MySQL replication for optimal performance.

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:

  • High availability The data stored on your MySQL server needs to be accessible 24 x 7.

  • Frequent backups To protect against data loss, you often back up your databases.

  • Mixed processing profiles Your MySQL database server must field requests from online transaction process (OLTP) and decision support system (DSS) users.

  • Abundant, low-performance computers Your organization might not have the fastest computers, but they have lots of them.

  • Widely dispersed users Your MySQL users are spread among multiple locations.

  • Modular application code Your MySQL-based applications can be easily altered to read data from the slave servers while writing data to the master.

     < Day Day Up > 

    MySQL Database Design and Tuning
    MySQL Database Design and Tuning
    ISBN: 0672327651
    EAN: 2147483647
    Year: 2005
    Pages: 131

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: