Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2002 10:35:18 -0500
From:      Joel Dinel <dinjo@touchtunes.com>
To:        jason+freebsd@kanda.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Basic load balancing with IPFW
Message-ID:  <20020322103518.A39798@sunder.touchtunes.com>
In-Reply-To: <20020322160952.Q28894-100000@uk2.kanda-systems.net>; from jason%2Bfreebsd@kanda.com on Fri, Mar 22, 2002 at 04:19:19PM %2B0000
References:  <LPBBIGIAAKKEOEJOLEGOIEKDCLAA.barbish@a1poweruser.com> <20020322160952.Q28894-100000@uk2.kanda-systems.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 22, 2002 at 04:19:19PM +0000, jason+freebsd@kanda.com wrote:
> The original poster was referring to balancing available server resources,
> you seem to be thinking about balancing bandwidth resources.  The two are
> not the same and require different techniques.
> 
> To the original poster:  Maybe you can post some censored firewall rules
> from the Linux box?  This might make it easier for someone else to advise
> you.
> 
> Jason
> 
---end quoted text---

Thank you! Finally, someone who understands what I am trying to do.

Here's a sanitized IPChains rule from the current firewall :

$MASQADM portfw -a -P tcp -L $LOCALIP 5556 -R $DEVCON1 5556 -p 1
$MASQADM portfw -a -P tcp -L $LOCALIP 5557 -R $DEVCON1 5557 -p 1
#$MASQADM portfw -a -P tcp -L $LOCALIP 5556 -R $DEVCON2 5556 -p 1
#$MASQADM portfw -a -P tcp -L $LOCALIP 5557 -R $DEVCON2 5557 -p 1

The "-p 1" part here is what does the ratio balancing. The 2 servers
(DEVCON1 and DEVCON2) are getting the same ratio of connections. If I
boost the number to 10 for DEVCON1, this machine will be getting 10
times more connections. It's a very simple and 'serial' load balancing
solution; the first connection goes to DEVCON1, the next one goes to
DEVCON21, and so on and so forth.

Somebody on this list suggested 'PEN' from the ports collection. That
would work. I was hoping of doing it at the filtering level, to be as
simple as possible.

IPFilter does Round-Robin'ing and Ratio load balancing, but I was hoping
to stick with IPFW (I know it much better).

Thanks Jason!

-- 
Joel Dinel
System Administrator
TouchTunes Digital Jukebox, Inc.
GnuPG key : http://lysander.mine.nu/~kint/mykey.asc

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020322103518.A39798>