Does using HAProxy with Amazon RDS require me to change my application logic?

We are currently using Amazon RDS with MySQL 5.5. I was reading about scaling using read-replicas (http://harish11g.blogspot.com/2013/08/Load-balancing-Amazon-RDS-MySQL-read-replica-slaves-using-HAProxy.html), but was unclear about something. Does using the HAProxy architecture require us to change our application logic to send SQL write requests to one agent and SQL read requests to another? I'm looking for a scaling solution that doesn't require us to change application logic, only potentially configuration files.

We are using Spring 3.1.4.RELEASE, JBoss 7.1.3.AS and Hibernate 4.1.0.Final.


HAProxy does not manage read/write splitting with MySQL. It is a very efficient and lightweight load balancing solution, but when used with MySQL, it has no protocol awareness like it does with http (where it can manipulate headers, route based on patterns, etc.)

HAProxy will load balance your read connections to a healthy replica, but that's all it will do for you on this setup... you still have to do read/write splitting in the application.

链接地址: http://www.djcxy.com/p/83264.html

上一篇: 用codigniter执行readreplica实现

下一篇: 在Amazon RDS中使用HAProxy是否需要我更改我的应用程序逻辑?