Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 1996 22:01:08 +1000 (EST)
From:      Darren Reed <avalon@coombs.anu.edu.au>
To:        danny@panda.hilink.com.au (Daniel O'Callaghan)
Cc:        sos@freebsd.org, michaelh@cet.co.jp, freebsd-hackers@freebsd.org, ipfilter@coombs.anu.edu.au
Subject:   Re: Load-balancing box
Message-ID:  <199608121201.FAA15946@freefall.freebsd.org>
In-Reply-To: <Pine.BSF.3.91.960812184934.250B-100000@panda.hilink.com.au> from "Daniel O'Callaghan" at Aug 12, 96 06:51:37 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In some mail from Daniel O'Callaghan, sie said:
> On Mon, 12 Aug 1996 sos@FreeBSD.org wrote:
> 
> > In reply to Michael Hancock who wrote:
> > > 
> > > A designated IP number can be setup so that when it hits the box it
> > > translates it to one of the IP addresses for the multiple servers sitting
> > > behind it.  Otherwise it just functions as bridge.
> > > 
> > > If a server goes down then it stops dispatching requests to it.
> > 
> > Nice idea, I'll give them that...
> > 
> > > How hard would it be to build something like this with FreeBSD?
> > 
> > Actually I think it would be pretty easy, depending on how familliar
> > one is with the network code.
> 
> Darren Reed already has working src ip translation.  It should not be hard 
> to change it to dest addr translation.
> 
> See http://coombs.anu.edu.au/~avalon/

Actually, it is almost already part and parcel of the package.

As Daniel mentions, it does NAT (forward, output triggered).

On the other side, you can redirect packets (input triggered) to an
arbitary destination.  One use of that solution is for transparent
proxying (using ftp-gw from FWTK is an example with patches supplied).

TO solve the above, you would simply do something like:

rdr ed0 webserver/32 port 80 -> webserver1 port 80
rdr ed0 webserver/32 port 8000 -> webserver2 port 80
rdr ed0 webserver/32 port 8080 -> webserver3 port 80

...although this isn't programmed for load balancing, it wouldn't be too
hard to bring that in under its wing.

(The above means packets coming in on interface ed0 to webserver,port are
changed to goto the address on the right of the "->").

Darren



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