On Sat, 15 Mar 2008 00:42:26 +0800 (CST) Joe Shen <joe_hznm@yahoo.com.sg> wrote:
hi,
we plan to set up a web site with two web servers.
The two servers should be under the same domain name. Normally, web surfing load should be distributed between the servers. when one server fails, the other server should take all of load automatically. When fault sever recovers, load balancing should be achived automatically.There is no buget for load balancer.
we plan to use DNS to balance load between the two servers. But, it seems DNS based solution could not direct all load to one server automatically when the other is down.
Is there any way to solve problem above?
One option might be to run two instances of VRRP/CARP across the hosts. You have Host A being the primary/master for one IP address that's in your DNS, and Host B being the primary/master for the other IP addess that's in your DNS. Host A is the secondary/backup for the IP address normally owned by Host B and Host B is the secondary/backup for the IP address normally owned by Host A. When, for example, Host A fails, Host B takes over being the primary/master for both IP addresses in your DNS, giving you your continued availability. If you want make that fail over transparent to load, you'd need to keep the load on the hosts <50% under normal, non-fail circumstances. Regards, Mark. -- "Sheep are slow and tasty, and therefore must remain constantly alert." - Bruce Schneier, "Beyond Fear"