Re: load balancing

Linux Advanced Routing and Traffic Control

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

 



Charlie Meyer wrote:
I ive set up a working linux router with load balancing as per the lartc guide. Everything is working properly, except for the load balancing does not seem to be equally balance the load. The first line gets about 60% of the incoming load, the 2^nd line gets about 40%, and the 3^rd line hardly gets any of it at all. The outgoing load is evenly balanced among all three lines.

I did not set any weights when I set up the route, so this is confusing to me. BTW, I have been using ntop as well as ibmonitor to view the load over each line.

when I have tried setting weights, such as 1 for the first line, 2 for the second line, and 4 for the second line, it still doesn’t balance correctly.

I am using fedora core 6 with all the latest packages and kernel as per yum.

any ideas here would be greatly appreciated

Keep in mind that you do not have any control of the traffic that is inbound to you. The only thing that you can control is the traffic that you send.

So, what is probably happening is that your system is load balancing the out bound traffic, which is being replied to by the server. Consider you have 3 connections, one out bound request each. Unless you are dealing with globally routable IP addresses behind your system and are not NATing at your system, responses to out bound requests will come back in to the same IP that the request originated from. With that in mind, consider one reply being a 512 byte response, one reply being a 1k byte response, and one reply being a 20 k byte response. In this case, one connection will receive 512 bytes, another 1 k byte, and the last 20 k bytes.

I think we can all agree that this is FAR from a load balanced scenario. However, we do not have any control over the reverse route, this is at best our providers control. If each link is with a different provider, there is no way to load balance the traffic back to our system. If, by chance the links are all with one provider and they are willing to work with you and you do not have any reverse path filtering in place, the provider could spread the load across all the links evenly. However, this is way beyond the scope of "Load Balancing" under Linux, or any thing else for that matter, and thus is more or less just accepted.

If you would like, I can go in to more depth as to why this does not work as is and what would have to be done to make this work.

Incidentally, this is also why QoS does not really work well on inbound.



Grant. . . .
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux