MySQL Forums
Forum List  »  Router & Proxy

change round robin type of mysql proxy
Posted by: Aditya Baskoro
Date: February 09, 2010 01:27AM

Hi

i want to make a lua script that will change the standard round robin of mysql proxy to an adaptof one

the idea is that i have the lua script read a file that always updated by load collector from mysql server so that the packet from mysql proxy will be sent to the mysql server which has the lowest load

i'm thinking of using shell command in lua script like this

os.execute(mysql-proxy --proxy-backend-addresses=sakila:3306)

so that script will choose which mysql server that mysql proxy will sent the packet
is that possible??

thx for your appreciation :)

edited : i read about proxy.connection.backend_ndx and proxy.servers[]
can someone tell me how is that function used??

says i have

mysql-proxy --proxy-backend-addresses=naruto:3306 --proxy-backend-addresses=sakila:3306

will naruto in proxy.connection.backend_ndx in the index 0 or randomly?
thx



Edited 1 time(s). Last edit at 02/10/2010 01:58AM by Aditya Baskoro.

Options: ReplyQuote


Subject
Views
Written By
Posted
change round robin type of mysql proxy
4042
February 09, 2010 01:27AM


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.