For more information on MySQL Load Balancer, including how to be
included in the beta programme, contact
<enterprise-beta@mysql.com>.
The MySQL Load Balancer is an application that communicates with one
or more MySQL servers and provides connectivity to those servers for
multiple clients. The MySQL Load Balancer is logically placed
between the clients and the MySQL server; instead of clients
connecting directly to each MySQL server, all clients connect to the
MySQL Load Balancer, and the MySQL Load Balancer forwards the
connection on to one of the MySQL servers.
The initial release of the MySQL Load Balancer provides read-only
load balancing over a number of MySQL servers. Initially, you
populate the MySQL Load Balancer configuration with the list of
available MySQL servers to use when distributing work. The MySQL
Load Balancer automatically and evenly distributes connections from
clients to each server. Distribution is handled by a simple count
for the number connections distributed to each server - new
connections are automatically sent to the server with the lowest
count.
When used in combination with a replication setup, the MySQL Load
Balancer also monitors the replication status. The master and slaves
within the replication setup are monitored and additional decisions
about the routing of incoming connections to MySQL servers are made
based on the replication status:
If MySQL Load Balancer identifies that the slave is lagging
behind the master for it's replication threads, then the slave
is automatically taken out of the list of available servers.
Work will therefore be distributed to other MySQL servers within
the slave replication group.
If the replication thread on a slave is identified as no longer
running, the slave is also automatically removed from the list
of available servers.
If either situation changes, such as the replication delay
decreases to an acceptable level, or the replication thread on
the failed slave is restarted and the replication process
catches up, then the slave will be brought back in to the list
of available MySQL servers.
The MySQL Load Balancer is based on the MySQL Proxy, and consists of
two modules which work together to achieve its goal:
The proxy, which uses Lua scripts to
customize the handling of connections and query execution. The
`proxy` connects to several backend MySQL instances to which it
can send queries.
The monitor plugin connects to each of the
backends the proxy knows about and executes queries on each one
in regular intervals. The results of those queries are used to
determine the state of each backend.
User Comments
Add your own comment.