[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Webserver Redundacy

On Wed, Feb 28, 2007 at 08:04:57AM +1000, Julian De Marchi wrote:
> Again, not sure of the term to search for on Google, so here is my question.
> My main website is www.jdcomputers.com.au with an ip of If
> for some reason this goes down I would like the domain name to point to my
> "hot spare" web server ( How would I accomplish this?

assuming you've already got some way of mirroring your web pages from one
server to the other, the best way is to use LVS (Linux Virtual Server).  LVS
is linux-kernel based load-balancing.

there's lots of different ways of setting it up.  the best (in terms of
reliability) is to have two dedicated LVS boxes, configured in failover mode
(so that one takes over the load-balancing job if the other dies), and two (or
more) real web servers being load-balanced by the LVS boxes.

if you're on a tighter budget than that, then you can do it a lot cheaper.
one of the nices things about LVS is that the load-balancer boxes can double
as 'real-servers'.  so your web server machines can be both the load balancer
AND the web server.

LVS gives you more than just high-availabilty (HA) redundancy, it gives you
load-balancing at the same time, so the load is shared across multiple
computers.  this, IMO, is better than having your spare machine sit idle 90+%
of the time.

(note: if you're using a database for your web site, you also need to do
database clustering/replication so that the db is also always available no
matter which servers are up at any given time).

for more info on LVS, see http://www.linuxvirtualserver.org/

it's well-documented and reasonably easy to set up if you take the time to
carefully read the documentation and examples, and plan what you're going to
do.  it can be a good idea to practice on two (or more) old machines first, so
you understand how it all works before messing with your live web servers.

BTW, LVS is a standard part of the linux kernel (you may need to
recompile your kernel to enable LVS), and the LVS tools are packaged for

# apt-cache search LVS
keepalived - Failover and monitoring daemon for LVS clusters
ldirectord - Monitors virtual services provided by LVS
ldirectord-2 - Monitors virtual services provided by LVS


craig sanders <cas@taz.net.au>

"Is it just me, or does anyone else read `bible humpers' every time
someone writes `bible thumpers?'
		-- Joel M. Snyder, jms@mis.arizona.edu

Reply to: