Ping an IP from all WANs and start the session on the one with quickest ping.
-
I have three ISPs going into my box and I'd like to set up my own kind of load balancing.
At the start of every session with a particular IP, the router should ping the IP from every available WAN connection and whichever WAN returns the ping fastest, it should start the main portion of the session on that WAN. The router would then make the sessions sticky to that WAN until it times out.
Benefits:
1. You're near guaranteed to use the fastest available link to any particular server.
2. When one link starts being used up by intensive transfers, the ping time it returns for new connections will lengthen and the router will start using the other connection automatically.
3. When one link goes down, it's ping time will be infinite. This would force all connections to automatically fail over to the fastest available link still working.
4. You're pinging the exact server you're trying to connect to instead of pinging the gateway like typical load balancing. (Gateways aren't always ping-able)
Cons:
1. There will be a short delay (in the order of milliseconds) added to the start of each new session.
2. Sessions would have to be well programmed with memory management in mind for scalability in large traffic environments.
3. You must chose a link after a certain amount of time (say, 200ms) because some IPs will disregard pings.
4. A rolling list of IPs and the WAN that was used to connect to them would need to be created and any IP entry not used within a certain amount time would need to be deleted.
Tell me what you think,
–AkkerKid