Re: Want to know more about the load-balancing
Let's say we have:
2x [ app ] -> 1x [ proxy ] -> 2x [ mysqld ]
* 2 application-servers with a local proxy
* 1 proxy as load balancers
* 2 mysqld servers we want to load balance across
This the most basic setup for the proxy as load balancers.
As there is only one load-balancer, it is a SPOF (Single Point of Failure).
2x [ app ] -> 2x [ proxy ] -> 2x [ mysqld ]
Adding a second proxy solves the problem. But it open the question how to does the app access the second proxy in case the first one fails:
1) VRRP and move the virtual IP to the new server
2) if the app uses JDBC let it fail-over itself (if proxy1 is not reachable, it picks proxy2)
3) put a proxy next to the application and let it detect that the LB-proxies are down and failover
2x [ app -> proxy ] -> 2x [ proxy ] -> 2x [ mysqld ]
This way the app can stay unchanged and just connects to a local proxy. It will know which of the proxies is up by tracking the connect() calls for success or failure and send the requests to the proxy which is up.
$ mysql-proxy \
--proxy-backend-addresses=10.0.0.2:3306 \
--proxy-backend-addresses=10.0.0.3:3306
The proxy is tracking the availability of its backends for the normal load balancing. If one of the backends is unavailable, it is take out of the rotation for a while and check back again later. This is transparent to the clients.
Using VRRP saves to setup the proxies on the app servers and means less latency as only one proxy has to be passed.
Jan
Subject
Views
Written By
Posted
6020
June 14, 2007 04:26PM
3502
June 15, 2007 12:04PM
3349
July 06, 2007 04:24PM
3144
July 06, 2007 04:45PM
3217
July 06, 2007 08:18PM
3125
July 07, 2007 02:36AM
3137
July 07, 2007 07:59AM
3151
July 07, 2007 08:38AM
3221
July 07, 2007 07:55PM
Re: Want to know more about the load-balancing
3560
July 08, 2007 04:00AM
5074
July 08, 2007 09:44AM
3102
July 08, 2007 11:20AM
3030
July 08, 2007 11:59AM
3014
July 26, 2007 10:54PM
2865
July 27, 2007 08:15AM
3475
July 13, 2007 02:20AM
3112
July 22, 2007 03:59AM
3238
July 24, 2007 10:29AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.