From owner-freebsd-net@FreeBSD.ORG Wed Aug 30 14:33:14 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7023D16A4DE for ; Wed, 30 Aug 2006 14:33:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C0F543D46 for ; Wed, 30 Aug 2006 14:33:13 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k7UEX9Xg028501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Aug 2006 18:33:10 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k7UEX9Tq028500; Wed, 30 Aug 2006 18:33:09 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 30 Aug 2006 18:33:09 +0400 From: Gleb Smirnoff To: Max Laier Message-ID: <20060830143309.GY76666@FreeBSD.org> Mail-Followup-To: Gleb Smirnoff , Max Laier , freebsd-net@freebsd.org, Baldur Gislason References: <20060830131929.GD804@gremlin.foo.is> <20060830132659.GF30474@catpipe.net> <200608301623.01478.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200608301623.01478.max@love2party.net> User-Agent: Mutt/1.5.6i Cc: freebsd-net@FreeBSD.org, Baldur Gislason Subject: Re: Load balancing for web servers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 14:33:14 -0000 On Wed, Aug 30, 2006 at 04:22:54PM +0200, Max Laier wrote: M> > > I'd like to set up a load balancing and resiliance system to M> > > load balance between a bunch of web servers running Apache tomcat M> > > (slow java stuff). Ideally I'd like each client IP to get mapped to a M> > > certain server and keep that mapping throughout the entire session. M> > > I'd also like to have some means of detecting a server that goes down M> > > and yank it from the load balancing pool. I do understand I may have M> > > to write some code on that side. M> > M> > pf and sticky rdr. M> > M> > Use a shell script that pings the hosts on the backend, to M> > insert/remove them from a persistent table. M> M> Have a look at: http://www.countersiege.com/doc/pfsync-carp/#big for one M> idea. All requirements (carp, pf and pfsync) are available in FreeBSD as M> well. Yeah, I was just looking for that URL to post it... :) Also, I'm using a small program to monitor backends and edit the pf tables: http://people.freebsd.org/~glebius/pfmon/ -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE