AirVantage/sbulb

From "round-robin" to "random-pick" ?

sbernard31 opened this issue · 0 comments

Currently the algorithm to dispatch traffic is very simple.
It's just a simple circular rotation :

  1. For 1st association we take the 1st real server,
  2. Then 2nd association we take the 2nd real server,
  3. After the last real server we go back to the beginning.

To do that we need a state : the last(or next) real server used.

The idea of "doing a random pick" was raised. This way we could remove the state.
We could investigate this.

Maybe we can use : bpf_get_prandom_u32 helper function.