Auto loadbalancing with iptables & iproute2

bert hubert ahu@ds9a.nl
Mon, 16 Jul 2001 07:49:29 +0200


On Sun, Jul 15, 2001 at 05:11:37PM -0400, Ramin Alidousti wrote:


> > Please read it and tell me what you think. Basically you can take N servers
> > and give them all a single IP address, and have them all accept a share of
> > the load. And it is positively evil.
> 
> Neat idea. But some points:
> 
> 1) Can't you do the same thing with the shared IP living on your router
>    and doing DNAT based on the formula you described.

If your router is a simple machine, you would have a hard time doing this. A
lot of people (still :-)) use Ciscos as routers and often don't like to do
anything more complex than needed.

> 2) The load is not fairly balanced...

That would then be up to a daemon shuffling the routes - you could have
metrics to give some hosts more attention than others. Iptables connection
tracking makes sure that even after routes have been reshuffled existing
routes stay alive.

> 3) If I spend so much money to by a switch, I'd not like to degrade my
>    switch to act as a hub.

True. This is not for everybody.

> But, very nice try :-)
> 
> Hou je maar goed.

Very good :-)

Zal ik doen!

Regards,

bert

-- 
http://www.PowerDNS.com      Versatile DNS Services  
Trilab                       The Technology People   
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet