Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2002 16:45:16 +0000 (GMT)
From:      jason+freebsd@kanda.com
To:        Joel Dinel <dinjo@touchtunes.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Basic load balancing with IPFW
Message-ID:  <20020322163504.Y28894-100000@uk2.kanda-systems.net>
In-Reply-To: <20020322103518.A39798@sunder.touchtunes.com>

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

On Fri, 22 Mar 2002, Joel Dinel wrote:

> 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).

Ah ha I see, your using NAT.  You might want to check out the natd(8) man
page.  I'm not sure that it has anything similar to the -p feature,
although I'm not very familiar with its abilities.

I'm sure someone else will be able to advise you.

Jason.




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?20020322163504.Y28894-100000>