MySQL Proxy Load balancing and Failover Tutorial

by Vivek Gite on August 10, 2007 · 6 comments

MySQL Proxy is a simple and new program that sits between your client and MySQL server(s) that can monitor, analyze or transform their communication. Its flexibility allows for a wide variety of use cases, including:
a) Load balancing
b) Failover
c) Query analysis
d) Query filtering and modification
e) and many more...

MySQL Proxy tutorial

Oreilly has published a nice tutorial using MySQL proxy application:

MySQL Proxy is a lightweight binary application standing between one or more MySQL clients and a server. The clients connect to the Proxy with the usual credentials, instead of connecting to the server. The Proxy acts as man-in-the-middle between client and server.

In its basic form, the Proxy is just a redirector. It gets an empty bucket from the client (a query), takes it to the server, fills the bucket with data, and passes it back to the client.

If that were all, the Proxy would just be useless overhead. There is a little more I haven't told you yet. The Proxy ships with an embedded Lua interpreter. Using Lua, you can define what to do with a query or a result set before the Proxy passes them along.

MySQL Proxy Load balancing and Failover Tutorial - Logo

Download MySQL proxy

You can download MySQL proxy here

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 6 comments… read them below or add one }

1 matthias August 10, 2007

Anyone tested this already? Sounds relly nice, but seems to be very new software…

Reply

2 FreeBSD Geek June 25, 2008

Yes, anyone out there who have tested this? espcialy on a set of freebsd servers?

Reply

3 Wagner Bianchi April 21, 2009

I have tested on a lab and it works fine. ItÅ› a new software and have something to improve.

Reply

4 dose July 2, 2009

mysql-proxy which running on freebsd 7.2 not open a port

Reply

5 Nikolay Mihaylov July 27, 2010

anyone tested proxy + replication and read-only / read-write back-ends ?

Reply

6 gaous afrizal March 11, 2011

actually i wanna try this for my final project undergraduate
but is it possible to create load balancer based on performance from database server using this one? :)

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 13 + 5 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: