MySQL Proxy Load balancing and Failover Tutorial

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

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 4 comments… read them below or add one }

1 matthias 08.10.07 at 4:11 pm

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

2 FreeBSD Geek 06.25.08 at 11:38 pm

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

3 Wagner Bianchi 04.21.09 at 5:48 pm

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

4 dose 07.02.09 at 8:12 am

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

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , ,

Previous post: nixCraft FAQ Roundup ~ Aug, 7, 2007

Next post: lftp to accelerate ftp / http download speed under Linux and UNIX