Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2002 08:36:08 +1000 (EST)
From:      Colin Campbell <sgcccdc@citec.qld.gov.au>
To:        Emre Bastuz <info@emre.de>
Cc:        <freebsd-isp@FreeBSD.ORG>
Subject:   Re: HTTP Load Balancing and Availability Solutions
Message-ID:  <Pine.BSF.4.33.0204260816040.20847-100000@guru.citec.qld.gov.au>
In-Reply-To: <3CC6A5D2.3070701@emre.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Wed, 24 Apr 2002, Emre Bastuz wrote:

> Hi,
>
> I=B4m looking for a software that does the job of accepting
> HTTP request as a webserver and then distributes these
> to other servers - depending on which one is currently up.

Here's one way. The "real" IP address of each web server is configured as
a loopback alias on every host. Use dynamic routing (eg OSPF) to allow the
router to deicde which host to send the packets to. When a host dires, it
might take 10-15s for the routes to change but it all happens
automatically. Example:

2 x host
4 x httpd each with own IP

On both hosts, create 4 IP aliases on loopback,

=09ifconfig lo www.a.com alias
=09ifconfig lo www.b.com alias
=09ifconfig lo www.c.com alias
=09ifconfig lo www.d.com alias

Let's say that under normal circumstances we want host-1 to serve www.a
and www.b and host-2 to serve the other two.

On the router configure the dynamic routing as follows:

=09destination www.a.com via host-1 cost 1
=09destination www.b.com via host-1 cost 1
=09destination www.c.com via host-1 cost 2
=09destination www.d.com via host-1 cost 2

        destination www.a.com via host-2 cost 2
        destination www.b.com via host-2 cost 2
        destination www.c.com via host-2 cost 1
        destination www.d.com via host-2 cost 1

By default the router will send all traffic to www. and ww.b to host-1 and
the other two servers to host-2. If host-1 goes down, the link-state
information (eg in OSPF) will tell the router to go via host-2 to www.a
and www.b since the link via host-1 is no longer available.

This way you don't need a lot of extra hardware (the web servers might
need to be a bit bigger than normal), it's scalable, provides some
(manual) load balancing and can fail over automatically and very quickly.

Colin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0204260816040.20847-100000>