MySQL-Proxy Round Robin

ldvhai used Ask the Experts™
Hi All,

I have Mysql-Proxy Server (IP: and 03 DB servers, in there:

- DB Server 1: Read & Write
- DB Server 2: Read
- DB Server 3: Read

I checked the DB Server 1 (Read & Write OK) & DB Server 3 (Read OK)
And DB Server 2 never read.

#vi /etc/mysql-proxy.cnf

proxy-address=      #IP, port of proxy server
proxy-backend-addresses=       #IP, port of DB server for writting
proxy-read-only-backend-addresses=      #IP, port of DB server for read
proxy-read-only-backend-addresses=       #IP, port of DB server for read
proxy-lua-script=/usr/local/mysql-proxy/lua/rw-splitting.lua # script read-write
admin-lua-script=/usr/local/mysql-proxy/lua/admin-sql.lua # script management
log-file=/usr/local/mysql-proxy/log/mysql-proxy.log       #file log

Where is the parameter for round robin that I can declare in this configuration above? Is it right?

Please give me your advices about this issue.

Thanks in advance,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
--proxy-backend-addresses=host:port, -b host:port

The host name (or IP address) and port of the MySQL server to connect to. You can specify multiple backend servers by supplying multiple options. Clients are connected to each backend server in round-robin fashion. For example, if you specify two servers A and B, the first client connection will go to server A; the second client connection to server B and the third client connection to server A.

When using this option on the command line, you can specify the option and the server multiple times to specify multiple backends. For example:

shell> mysql-proxy --proxy-backend-addresses --proxy-backend-addresses

When using the option within the configuration file, you should separate multiple servers by commas. The equivalent of the preceding example would be:

it's by default round-robin no need to define parameter. Your configuration is perfectly fine.



Ok, Thanks.


I've requested that this question be closed as follows:

Accepted answer: 0 points for ldvhai's comment #a40129118

for the following reason:

OK, Thks,
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Was this resolved ?



Yes, solved, thks.


Thks for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial