# Mysql Replication with write forwarding?

**URL:** <https://forums.percona.com/t/mysql-replication-with-write-forwarding/538>\
**Category:** Other MySQL® Questions\
**Created:** [November 23, 2007, 4:53am UTC](https://forums.percona.com/t/mysql-replication-with-write-forwarding/538 "2007-11-23T04:53:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![al.james](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/al.james/32/745_2.png) [@al.james](https://forums.percona.com/u/al.james)\
**Post date:** [November 23, 2007, 4:53am UTC](https://forums.percona.com/t/mysql-replication-with-write-forwarding/538/1 "2007-11-23T04:53:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [November 24, 2007, 11:03am UTC](https://forums.percona.com/t/mysql-replication-with-write-forwarding/538/2 "2007-11-24T11:03:28Z")

</div>

What you are talking about is the MySQL Proxy.

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

---

<div class="post-metadata">

**Author:** ![al.james](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/al.james/32/745_2.png) [@al.james](https://forums.percona.com/u/al.james)\
**Post date:** [November 27, 2007, 6:13am UTC](https://forums.percona.com/t/mysql-replication-with-write-forwarding/538/3 "2007-11-27T06:13:01Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![scoundrel](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@scoundrel](https://forums.percona.com/u/scoundrel)\
**Post date:** [November 27, 2007, 3:18pm UTC](https://forums.percona.com/t/mysql-replication-with-write-forwarding/538/4 "2007-11-27T15:18:53Z")

</div>

| [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!
