North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

RE: load balancing and fault tolerance without load balancer

  • From: Darden, Patrick S.
  • Date: Mon Mar 17 09:00:08 2008

I understand you have no budget for a comercial load balancer; however, you should consider setting up two inexpensive servers or PCs as load balancers.  You could do it with one, but that would itself be a single point of failure.  The OS and software are all free.  Two old PCs would be next to free.  Heck, two bottom of the line new servers would only cost $2K--$3K total.

OS		linux (fedora 8, SUSE, any modern distro)
Software	LVS ( http://www.linuxvirtualserver.org/ )
		HA ( http://www.linux-ha.org/ ) 

The How To documentation is short and sweet (there is a full how to, and a mini how to) http://www.austintek.com/LVS/LVS-HOWTO/ .  I've been running a cluster of 12 web servers for almost 5 9s for 6 years now based off this stuff.  You can take a server down for maintenance and nobody notices.

There is a complete bundled package using RPM called Ultra Monkey--it includes LVS and HA and everything else you need.  Find it here:  http://www.ultramonkey.org/ Documentation that should work for Fedora, CentOS, and RHEL4+ is at http://www.jedi.com/obiwan/technology/ultramonkey-rhel4.html

--p



-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of
Mark Smith
Sent: Friday, March 14, 2008 6:44 PM
To: Joe Shen
Cc: [email protected]; NANGO
Subject: Re: load balancing and fault tolerance without load balancer



On Sat, 15 Mar 2008 00:42:26 +0800 (CST)
Joe Shen <[email protected]> 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"