[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load balancing/failover

On Wed, 2 Oct 2002, Daniel Hartmeier wrote:
> Another point is how this deals with #Ip1 going down. Should any part of
> pf (in kernel?) monitor (or even probe) the targets and modify the list
> automatically? Or would you want a userland daemon to do that? Or do it
> manually completely?
Just write an userland daemon that monitors all the IPs and change the
PF rule to remove the IP of servers that go down and later add it again.
Just copy the behaviour IPFilter has. Described in the old ipnat(5)
       Two options for use with  rdr  are  available  to  support
       primitive,  round-robin  based  load balancing.  The first
       option allows for a rdr to specify a  second  destination,
       as follows:
       rdr le0 port 80 ->, port 80 tcp
       This  would send alternate connections to either
       or  In scenarios where the load is being spread
       amongst a larger set of servers, you can use:
       rdr le0 port 80 ->, port 80 tcp round-robin
       rdr le0 port 80 -> port 80 tcp round-robin
       In   this   case,  a  connection  will  be  redirected  to, then and then before  going
       back  to   In  accomplishing this, the rule is
       removed from the top of the list and  added  to  the  end,
       automatically, as required.  This will not effect the dis-
       play of rules using "ipnat -l", only the internal applica-
       tion order.
Dries Schellekens
email: gwyllion@ulyssis.org