Replicate a MySQL database and to load balance traffic with MySQL Proxy (Windows) | Free template
Here you can download a free tutorial to replicate a MySQL database from a database server (master) to one or more other database servers (slaves) and to load balance traffic between database servers using MySQL Proxy.
A popular website that gets more and more visitors leads to increased demands on the web server and the database server that have to handle the increasing traffic volume. An increasing volume of traffic means that it is not enough with just one web server and / or just one database server to handle the traffic in the end. A decision to load balance traffic between multiple database servers is taken when it is not possible to increase performance (scale-up) for the existing database server or when there is more incentive to increase the number of database servers (scale-out) than to get a better computer for one database server.
To create a scalable set of MySQL servers, it is necessary to replicate (copy) a database to one or more other database servers as well as using a software between web servers and database servers to load balance the traffic between database servers. A scalable set of database servers means that you should be able to add a database server to the set without the need to do any changes in application code.
In this template with a free tutorial to replicate a MySQL database and to load balance traffic between database servers have we created three different server instances of MySQL on one computer. We have created a master server that can be used for writes to and reads from the database and two slave servers that can be used for reading from the database. We have chosen to replicate the database from our master server to our two slave servers, but we could also chosed to replicate from the master server to one slave server and then from this slave server to the next slave server. MySQL only supports one-way replication and that means that it is not possible to create three MySQL database servers that write to each other (merge replication).
In this template with a free tutorial to replicate a MySQL database and to load balance traffic between database servers, we have chosen to use MySQL Proxy to load balance traffic between our MySQL database servers. MySQL Proxy uses a "Round-robin" schedule as default for load balancing between database servers but you can also refer to Lua scripts to create more advanced load balancing rules. A "Round-robin" schedule means that the first client connects to server 1, the second client to server 2 and so on.
01/01/2015 | Created by All-templates.biz
Download Replicate a MySQL database and to load balance traffic with MySQL Proxy (Windows) | Free template »
Tags: server management