All of lore.kernel.org
 help / color / mirror / Atom feed
* destination load balancing
@ 2006-09-21 21:07 Radovan Jablonov
  2006-09-21 21:27 ` Martijn Lievaart
  0 siblings, 1 reply; 2+ messages in thread
From: Radovan Jablonov @ 2006-09-21 21:07 UTC (permalink / raw)
  To: netfilter

Hello,

Has iptables possibility (or will have) to use other load balancing
methods/algorithms (for example: weighted round-robin, hash, load agent,
custom algorithm)?

From 'man iptables':

   DNAT
        This target is only valid in the nat table, in the PREROUTING
and OUTPUT
	chains, and user-defined chains which are only called from those
chains.
        It  specifies that the destination address of the packet should
be
	modified (and all future packets in this connection will also be
	mangled), and rules should cease being examined.  It takes one
type of
	option:

       --to-destination ipaddr[-ipaddr][:port-port]
              which can specify a single new destination IP address, an
              inclusive range of IP addresses, and optionally, a port
range
              (which  is  only valid if the rule also specifies -p tcp
or -p
              udp).  If no port range is specified, then the destination
port
              will never be modified.

              You  can  add several --to-destination options.  If you
specify
              more than one destination address, either via an address
range or
              multiple --to-destination options, a simple round-robin
(one after
              another in cycle) load balancing takes place between these
              addresses.

Sincerely,
--------------------------------------------
Radovan Jablonovsky
Database Architect/DBA
Arrow Transportation Systems Inc. 
Tel: (250) 571-7773
Email: rjablonov@arrow.ca
WWW: www.arrowtransportation.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: destination load balancing
  2006-09-21 21:07 destination load balancing Radovan Jablonov
@ 2006-09-21 21:27 ` Martijn Lievaart
  0 siblings, 0 replies; 2+ messages in thread
From: Martijn Lievaart @ 2006-09-21 21:27 UTC (permalink / raw)
  To: Radovan Jablonov; +Cc: netfilter

Radovan Jablonov wrote:

>Hello,
>
>Has iptables possibility (or will have) to use other load balancing
>methods/algorithms (for example: weighted round-robin, hash, load agent,
>custom algorithm)?
>  
>
No, not directly.

If you can set a fwmark based on some criterium you could implement more 
advance schemes, but that requires some custom match the YOU have to write.

So a hash based load balancing could be implemented faily easily, just 
write a module that sets fwmark based on the hash. I guess more people 
would be interested in this . (If only to load balance over multiple 
links, f.i.).

Load balancing based on some kind of load agent would be more difficult, 
one has to communicate with userspace for this. I imagine many people 
would be interested in this.

Weighted round robin is actually fairly easy by using the nth match. 
lets say you want 2/3 go to A and 1/2 3 go to B. Just use nth to devide 
in 3's and send cases 0 and 1 to A and case 2 to B.

M4



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-21 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 21:07 destination load balancing Radovan Jablonov
2006-09-21 21:27 ` Martijn Lievaart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.