List:Replication« Previous MessageNext Message »
From:Walter Heck - OlinData.com Date:December 9 2010 9:51am
Subject:Re: Load balancing with MySQL Proxy
View as plain text  
Just to make sure the message is loud and clear here: this is a
_really_ bad idea, unless you have written your application yourself
and you can 100% guarantee that these cases do not exist. (in which
case: you must be writing either something crazy simple or performing
voodoo ;) )

Walter

On Wed, Dec 8, 2010 at 07:47, Rick James <rjames@stripped> wrote:
> 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
>
>
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:
>  http://lists.mysql.com/replication?unsub=1
>
>



-- 
Walter Heck
--
Founder @ OlinData (http://olindata.com)
Co-founder @ Tribily (http://tribily.com)
--
Follow @tribily on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/tribily
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