MySQL Forums
Forum List  »  Router & Proxy

Master-Master full Redundant/Balanced setup
Posted by: Romain K
Date: September 24, 2009 03:45AM

Hello,

I'm looking for some advices/help with LUA scripts.

We are trying to setup a fully redundant/load-balanced setup of MySQL Proxy with two Masters in bidirectionnal replication.
For now, the development (virtual machines) look like this :

[MySQL-Proxy]
|
|
([Master1] <-- Replication --> [Master2])

I'm using latest bazaar release with last rw-splitting.lua
The goal is to have "SELECT" sent to Master2 and everything else to Master1.
If Master1 falls, all queries goes to Master2, if Master1 become available again, MySQL-Proxy goes back to normal usage (Writes -> M1, Reads -> M2).

But I can't have Master2 recognized as a "slave" in normal behavior, even if I launch MySQL-Proxy like this :

mysql-proxy --proxy-address=:3306 --proxy-backend-addresses=master1:3306 --proxy-backend-addresses=master2:3306 --proxy-read-only-backend-addresses=master2:3306 --proxy-lua-script=/root/rw-splitting.lua --log-level=debug

I set master2 to be at the same time a rw and a ro backend but no luck.

Still, if I do that, I'm not sure it's gonna work as whished.

Does someone has an idea on how to achieve this or just how to have Master2 recognized as a Master and a Slave ?

Thanks in advance for you advices and, please, forgive me for my english :)

Options: ReplyQuote


Subject
Views
Written By
Posted
Master-Master full Redundant/Balanced setup
4618
September 24, 2009 03:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.