MySQL Forums
Forum List  »  Router & Proxy

Re: Load balancing issues on a Master/Master architecture
Posted by: Kin JOY
Date: July 20, 2009 08:31AM

Hi Diego,

First of all, thanks for replying.

Ok so let's take a simplest architecture. Assuming that I have one master and one slave.

LUA_PATH="/usr/src/mysql-proxy-0.7.2/lib/?.lua"

mysql-proxy \
--log-file=/var/log/mysql-proxy.log \
--log-level=debug \
--proxy-lua-script=/usr/src/mysql-proxy-0.7.2/lib/rw-splitting.lua \
--proxy-address=10.33.3.241:3306 \
--proxy-backend-addresses=10.33.3.242:3306 \
--proxy-read-only-backend-addresses=10.33.3.243:3306 \
--daemon

Everything works fine but it's not an active/active LB. The selects goes to the slave and when i turn off the slave, Selects are on the master. When the slave goes up again, the selects come back to it.

for ((f=1;f<5000;f++)) ; do mysql -h 10.33.3.241 -P 3306 -u proxyuser -p****** -e 'SELECT 42;'; done



At least, I would like to have some real active/active LB on the selects. So I added the master as a slave :

LUA_PATH="/usr/src/mysql-proxy-0.7.2/lib/?.lua"

mysql-proxy \
--log-file=/var/log/mysql-proxy.log \
--log-level=debug \
--proxy-lua-script=/usr/src/mysql-proxy-0.7.2/lib/rw-splitting.lua \
--proxy-address=10.33.3.241:3306 \
--proxy-backend-addresses=10.33.3.242:3306 \
--proxy-read-only-backend-addresses=10.33.3.243:3306 \
--proxy-read-only-backend-addresses=10.33.3.242:3306 \
--daemon

But the script have the same behaviour (active/passive). Have you got any idea ? Thanks a lot for your help :)

Regards,

Kin

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Load balancing issues on a Master/Master architecture
3928
July 20, 2009 08:31AM


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.