From owner-freebsd-isp Thu Apr 25 15:36:35 2002 Delivered-To: freebsd-isp@freebsd.org Received: from inet03.citec.qld.gov.au (inet03.citec.qld.gov.au [203.5.10.10]) by hub.freebsd.org (Postfix) with ESMTP id 0FD6C37B417 for ; Thu, 25 Apr 2002 15:36:29 -0700 (PDT) Received: by inet03.citec.qld.gov.au; id IAA06998; Fri, 26 Apr 2002 08:36:21 +1000 (EST) Received: from citecub.citec.qld.gov.au( 131.242.4.98) by inet03.citec.qld.gov.au via smap (V2.0) id xma006678; Fri, 26 Apr 02 08:36:11 +1000 Received: from guru.citec.qld.gov.au by citecub.citec.qld.gov.au (SMI-8.6/SMI-SVR4) id IAA29381; Fri, 26 Apr 2002 08:36:11 +1000 Received: from localhost (sgcccdc@localhost) by guru.citec.qld.gov.au (8.9.3/8.9.3) with ESMTP id IAA20993; Fri, 26 Apr 2002 08:36:09 +1000 (EST) (envelope-from sgcccdc@citec.qld.gov.au) X-Authentication-Warning: guru.citec.qld.gov.au: sgcccdc owned process doing -bs Date: Fri, 26 Apr 2002 08:36:08 +1000 (EST) From: Colin Campbell To: Emre Bastuz Cc: Subject: Re: HTTP Load Balancing and Availability Solutions In-Reply-To: <3CC6A5D2.3070701@emre.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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