Client-based load balancing

I’ve been using PCC load balancing on 2x 4mb adsl lines for a while now and I’m not quite satisfied with it, it balances the load quite well but the problem is there are alot of connection issues that come along with connection-based load balancing. Resulting in broken pages/downloads and such errors, so I’d like to move to a client-based load balancing scheme.

I’ve looked through the wiki and found that Nth load balancing seems to be close to what I want, however I have to setup static address lists. I’d like to be able to dynamically assign clients to each line depending on the actual load passing through each line, keeping in mind I don’t use hotspot, so no login page.

Any suggestions ?

bump

A quick search of the wiki turned up this: http://wiki.mikrotik.com/wiki/NTH_load_balancing_with_masquerade_(another_approach).

It details what I think you’re looking for.

thats exactly what I said, I searched the wiki, found Nth is close to what I’m looking for, however I have to statically pre-determine which client goes to which line, rather than let it be managed on a load basis, and thats unrealistic. What I need is a way to differentiate based on the current load, not some list I’ve written up. Then divide those clients equally onto the existing lines.
e.g:
PC 1 is assigned to line 1, its using 200kb/s
PC 2 is assigned to line 2, its using 150kb/s

therefore PC 3 would be assigned to line 2 when it attempts to make a connection, and all its next connections would be assigned to the same line. The way PCC works is similar to this, but it judges each connection independently, resulting in broken links and other browsing problems as a result of some connections going through the other line.

help ?

PCC works fabulously however I expect you’re currently doing load-balancing based on something other than “both-addresses” which is what you need to get around the fact some services don’t like seeing multiple connections from different IP’s.

We run a number of sites like this without any problems, you can see an example of my configurations here: http://www.mikrotik-routeros.com/2009/08/using-pcc-to-load-balance-across-multiple-non-bonded-links/

I agree, I quite liked how pcc worked with regards to load balancing. However I’d much rather have connection stability than great balance. The problem wasn’t just restricted to “a few” services, it was very disruptive, facebook games, file-sharing websites, video streaming, banking…etc. I experimented with both addresses as well as both addresses & ports, the latter seemed to be the most stable however it still resulted in too many broken connections as a result of attempting to connect from a second IP. If there is a way to fix this and keep using PCC i’d love to hear about it, otherwise I’m looking for the next best load balancing scheme. Your script looks very close to what I had setup, except I only had 2 aDSL lines.

nth seems to be closest to what I want, sacrificing great load balancing for better connection stability, however it seems to use static address lists. As if I should know beforehand which PC will be using the most load, which I find to be quite impractical.