-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Hey,
currently, MLVPN supports a weighted round robin load balancing algorithm. This is fine if the cost of all the links is roughly the same, and all links will be used equally (or proportionally to their configured bandwidth).
However, I’m in a situation where it is desirable to use a minimum number of links first and then gradually use more links as needed. Think about a setup with the following links:
- link1: residential ADSL
- link2: shared ADSL via a WiFi beam radio
- link3: mobile broadband with strict traffic limits
Whenever the needed bandwidth can be satisified by using link1, only link1 should be used. If necessary, link2 can be utilized, and if absolutely need be, link3 can be utilized as well.
My proposed algorithm for this situation works as follows:
- Introduce a (statically configured) priority field for each link.
- On each link, set a counter to 0.
- When a packet needs to be sent, grab the first link by priority.
- Check whether the counter exceeds the configured bandwidth. If yes, grab the next link by priority and check again.
- If no, send the packet and increment the counter with the number of bytes.
- Each second, reset all link counters to 0.
I have implemented this in a proof-of-concept implementation (outside of MLVPN) and it works fine.
I’m willing to put in the work to implement this within MLVPN.
Would you accept such a contribution?