Mysql Replication with write forwarding?

Hi there…

Just a quick question.

It occurs to me that the largest change required in a typical application when scaling from single mysql server to multiple servers in a replicated environment, is enforcing that database reads go to the slave whilst database writes go to the master. Most web application frameworks maintain a single database connection, and it can be alot of work to go through the code and open another whenever a write occurs.

Is there anyway of telling a mysql slave server to pass all write operations up to its master (or the top master in the case of multi level replication)?

This would be great as there would be no changes required, I just change the config file of the slave to forward all writes to its master. 5 mins, tops…

Is this possible?

What you are talking about is the MySQL Proxy.

And here is one of the articles about R/W splitting.

Thanks for that.

I have seen MySql Proxy before, but did not know it could do that (or the accepted term for it).

This leads to the question: How is mysql proxy for performance / reliability. Are any people using it in real life large scale applications?

Our application is very read heavy. Would we see a penalty in read performance using mysql proxy? I have seen the stats on their site and it looks ok, but of course, stats are not the same as real life experience!

Thanks!

[B]al.james wrote on Tue, 27 November 2007 06:43[/B]

This leads to the question: How is mysql proxy for performance / reliability. Are any people using it in real life large scale applications?

Our application is very read heavy. Would we see a penalty in read performance using mysql proxy? I have seen the stats on their site and it looks ok, but of course, stats are not the same as real life experience!

Thanks!

We’re going to do some detailed benchmarks on mysql proxy soon to see how it performs and what load it could be used for. So, stay tuned!