List:Replication« Previous MessageNext Message »
From:Rick James Date:December 7 2010 11:47pm
Subject:Re: Load balancing with MySQL Proxy
View as plain text  
Bad.

BEGIN
SELECT ... FOR UPDATE --> Slave
UPDATE ... --> Master
COMMIT

There are other cases of "critical read" that are more subtle.  Do NOT 
blindly send reads to slaves.

On 12/7/10 5:18 AM, carlos junior wrote:
> Hi all,
>
> I'm trying to implement a small-scale MySQL Proxy using load balancing between a
> single master and slave. I want to conduct a simple experiment where a workload generator
> sends requests to the MySQL Proxy, that redirects the requests to the Master (in case of
> writes) and to the Slave (in case of reads).
>
> I have already configured Master and Slave according to chapter 16 - Replication
> (MySQL 5.0 Reference Manual). I start master and slave and, after that, I call MySQL Proxy
> using the command:
>
> ./mysql-proxy  --proxy-backend-addresses=192.168.1.105:3306
> --proxy-read-only-backend-addresses=192.168.1.106:3306
> --proxy-lua-script=./share/doc/mysql-proxy/rw-splitting.lua --admin-username=root
> --admin-password=password --admin-lua-script=./lib/mysql-proxy/lua/admin.lua
>
> Where the first IP is my master and the second my slave. It returns no error message.
> The problem is that requests are not redirected to the slave. The master is handling all
> requests. Is there any error on the way I call the MySQL Proxy? Any idea?
>
> Thanks, Carlos
>
>
>
>        

-- 
Rick James - MySQL Geek

Thread
Load balancing with MySQL Proxy carlos junior7 Dec
  • Re: Load balancing with MySQL ProxyRick James8 Dec
    • Re: Load balancing with MySQL ProxyWalter Heck - OlinData.com9 Dec