From owner-freebsd-pf@FreeBSD.ORG Fri Nov 6 17:07:46 2009 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF891065676 for ; Fri, 6 Nov 2009 17:07:46 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 673EC8FC12 for ; Fri, 6 Nov 2009 17:07:46 +0000 (UTC) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 32D1E19E019; Fri, 6 Nov 2009 17:49:59 +0100 (CET) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id AC35019E023; Fri, 6 Nov 2009 17:49:56 +0100 (CET) Message-ID: <4AF453B4.8050909@quip.cz> Date: Fri, 06 Nov 2009 17:49:56 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0 MIME-Version: 1.0 To: Kevin References: <00a201ca5ef6$7a4f3ee0$6eedbca0$@com> In-Reply-To: <00a201ca5ef6$7a4f3ee0$6eedbca0$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-pf@freebsd.org Subject: Re: Question about round robin X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 17:07:46 -0000 Kevin wrote: > I am curious about simple round robin load balancing w/ PF. I see how simple > it is to setup within the FreeBSD configuration file, but have a fairly > simple question. > > Does PF detect if one of the addresses in the "pool" is not responsive? Or > does it just blindly send traffic to all the addresses in the pool > regardless? Is there some sort of heartbeat functionality or status check > perhaps? Has anyone accomplished something along these lines? Load balancing > would be pretty useless if I couldn't take a server out of the pool without > having to re-configure PF every time. "The round-robin method will accept multiple individual addresses using a list or table." Tables are easily maintained by external applications / scripts - you can update theme without reloading of the rules. So you can write some little daemon pinging all your hosts and drop IP of unresponsive host from the table. Or you can write some complex system to monitor hosts resources (CPU load, free memory, disk IO, etc.) and maintain content of the table by this criteria so you can get balancing based on real server load. Miroslav Lachman