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
5778
June 14, 2007 04:26PM
3392
June 15, 2007 12:04PM
3236
July 06, 2007 04:24PM
3033
July 06, 2007 04:45PM
3104
July 06, 2007 08:18PM
3008
July 07, 2007 02:36AM
3025
July 07, 2007 07:59AM
3039
July 07, 2007 08:38AM
3087
July 07, 2007 07:55PM
Re: Want to know more about the load-balancing
3450
July 08, 2007 04:00AM
4938
July 08, 2007 09:44AM
2977
July 08, 2007 11:20AM
2932
July 08, 2007 11:59AM
2902
July 26, 2007 10:54PM
2721
July 27, 2007 08:15AM
3363
July 13, 2007 02:20AM
2993
July 22, 2007 03:59AM
3126
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.