From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Taylor Date: Wed, 13 Dec 2006 22:42:03 +0000 Subject: Re: [LARTC] load balancing Message-Id: <458081BB.7020909@riverviewtech.net> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org 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=20 > does not seem to be equally balance the load. The first line gets about=20 > 60% of the incoming load, the 2^nd line gets about 40%, and the 3^rd=20 > line hardly gets any of it at all. The outgoing load is evenly balanced=20 > among all three lines. >=20 > I did not set any weights when I set up the route, so this is confusing=20 > to me. BTW, I have been using ntop as well as ibmonitor to view the load = > over each line. >=20 > when I have tried setting weights, such as 1 for the first line, 2 for=20 > the second line, and 4 for the second line, it still doesn=92t balance=20 > correctly. >=20 > I am using fedora core 6 with all the latest packages and kernel as per y= um. >=20 > any ideas here would be greatly appreciated Keep in mind that you do not have any control of the traffic that is=20 inbound to you. The only thing that you can control is the traffic that=20 you send. So, what is probably happening is that your system is load balancing the=20 out bound traffic, which is being replied to by the server. Consider=20 you have 3 connections, one out bound request each. Unless you are=20 dealing with globally routable IP addresses behind your system and are=20 not NATing at your system, responses to out bound requests will come=20 back in to the same IP that the request originated from. With that in=20 mind, consider one reply being a 512 byte response, one reply being a 1k=20 byte response, and one reply being a 20 k byte response. In this case,=20 one connection will receive 512 bytes, another 1 k byte, and the last 20=20 k bytes. I think we can all agree that this is FAR from a load balanced scenario.=20 However, we do not have any control over the reverse route, this is at=20 best our providers control. If each link is with a different provider,=20 there is no way to load balance the traffic back to our system. If, by=20 chance the links are all with one provider and they are willing to work=20 with you and you do not have any reverse path filtering in place, the=20 provider could spread the load across all the links evenly. However,=20 this is way beyond the scope of "Load Balancing" under Linux, or any=20 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=20 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@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc