MySQL Forums
Forum List  »  Router & Proxy

Architecture problem, rw-splitter does not work
Posted by: darren smith
Date: February 19, 2008 01:40PM

Yes MySql-Proxy has intention of quering multiple backends but the current architecture does not support this. In fact the current architecture doesn't even work for connecting to multiple databases. Rw-splitting DOES NOT WORK.

I've tried to use the rw-splitting, but noticed that even though you allow the script to select different databases (RW or R-ONLY), in fact it can't... I know this because i put debug statements in the MySql-Proxy to dump the destination database.

The problem is this... when you specify multiple databases in the configuration only one can be connected from the client side... i.e. remember if you call "mysql -h IP -pass=..." this is a connection request and so MySql-proxy really just hands off the connection protocol back and forth between the database and the client(with a little massaging). So the first time you establish a connection, mysql-proxy uses the first database configuration to establish the connection. IT DOES NOT ESTABLISH ALL CONNECTIONS AND CAN'T because of MYSQL's password hashing algorithm. When you attempt to select the backend_ndx from the LUA script, it can't because the Pool really only contains 1 database connection. MySql-Proxy acts like it changed the backend_ndx but it didn't and defaults to the only database connection.

IT DOES NOT ATTEMPT to connect to the other databases EVER. The code has to be redesigned to configure passwords in MySql-Proxy and establish connections up front or on the fly as the LUA script selects backend_ndx(s).



Edited 1 time(s). Last edit at 02/19/2008 02:39PM by darren smith.

Options: ReplyQuote


Subject
Views
Written By
Posted
Architecture problem, rw-splitter does not work
7339
February 19, 2008 01:40PM


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.