Skip navigation links

MySQL Forums :: Proxy :: Question about r/w splitting,Thanks


Advanced Search

Question about r/w splitting,Thanks
Posted by: cerlin gao ()
Date: September 05, 2007 06:58AM

Hello,I start mysql-proxy like this,

LUA_PATH="/usr/local/tools/mysql-proxy/trunk/lib/xtab.lua" /usr/local/sbin/mysql-proxy --proxy-backend-addresses=192.168.0.7:3306 --proxy-read-only-backend-addresses=192.168.0.6:3306 --proxy-lua-script=/usr/local/tools/mysql-proxy/trunk/lib/turial-keepalive.lua --proxy-address=192.168.0.7:4040

I have different data sets on both servers,with the same database name,the same table name and structure, only the data differs.

192.168.0.7:
mysql> SELECT * from `Group`;
+----+----------+---------
| id | uid | name
+----+----------+----------
| 1 | 1 | aaaa |
|
+----+----------+----------
1 rows in set (0.00 sec)

192.168.0.6:
mysql> select * from `Group`;
+----+----------+----
| id | uid | name |
+----+----------+-------
| 1 1 nnnnnn
+----+----------+------
4 rows in set (0.00 sec)

then I connect mysql-proxy from 6 clients like this,

mysql -h 192.168.0.7 -P4040

client #1:
mysql> SELECT * from `Group`;
+----+----------+---------
| id | uid | name
+----+----------+----------
| 1 | 1 | aaaa |
|
+----+----------+----------
1 rows in set (0.00 sec)

then input 2:

mysql> SELECT * from `Group`;
+----+----------+---------
| id | uid | name
+----+----------+----------
| 1 | 1 | aaaa |
|
+----+----------+----------
1 rows in set (0.00 sec)

So it seems that the proxy won't connect each client to each server in a round-robin fashion.

How to make it run in a r/w splitting

Options: ReplyQuote


Subject Views Written By Posted
Question about r/w splitting,Thanks 2625 cerlin gao 09/05/2007 06:58AM
Re: Question about r/w splitting,Thanks 1784 cerlin gao 09/05/2007 07:59AM


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.