Load Balacing new idea, i think.

Hi guys. As seening some scripts in wiki i’ve found this:

http://wiki.mikrotik.com/wiki/Scheduled_check_for_loaded_interfaces_(auto_adding_queue_to_some_IP_or_interface)

Now i’m thinking can we use this script sow to see if the wan1 has more traficc then wan2, redirect packets to wan2, and the reverse. I was thinking about this, because if 2 clients watch youtube, and they have connections from wan1, the wan 1 is full, and if a 3 client connects, if he is lucky he will connect to wan2, but if not he will connect to wan1, and will suffer browsin, cause at this point the wan1 is full, and wan2 is empty. What do you think about this situation? I think this i my problem at last topic from me, Load Balacing problem. Please guys leave some comments.Best regards.

well, the usual load balancing works well, if you have a lot of customers, because, some might download something using http, some might play games etc etc. and overall load is balanced because of that - every user is doing its own thing. if you have just some users, then you most of the time are better off using some other balancing method, like, one outgoing line is used for http/ftp dowloads, while other is used telephony, games etc.

I would agree with erjon to be able to incorporate link connection(session)count and/or bps in filter rules in firewall. That way you can decide to route according number of connections or speed, e.g. a WAN line might have many connections(Limewire) but little traffic, or big downloads, few connections(YouTube).

We need some advice from experts, can we implement this idea based on mangle, nat routes and scripts?

in contrack - check how many connections spawns simple web page. also if you “move” active connections you will brake them, or what was the idea?

because as i said - if you download we page there are a lot of connections, if it is some kind of media page, there will be a lot more of them, while downloading single large file will use 1 connection (if download manager is not in use)

all of that you can see in connection-tracking.

limit connection count you can in firewall

also you can throttle connections depending on bytes transmitted.

That’s all fine, but how do you make a mangle decision of no. of connections or bandwidth used?

you can try to add ip addresses to list in firewall filter and then mangle according addresslists that you have made