We want to have some other algorithms being possible and able to choose per route (for example from ingress). Algorithm ideas we could support:
Data to compare to select the least of N choices (https://medium.com/netflix-techblog/netflix-edge-load-balancing-695308b5548c):
Weighted round robin would also be a good alternative, where the weight is dependent of the size of the nodes.
@ruiaraujo can you elaborate on how to pass the data you need from nodes to the load balancer?
Could be something like a weight on each target.
Use case
I deploy my application using Spot of multiple sizes. My apps reacts and takes advantage of the added CPUs.
I have Skipper as LB where the route has the meta information on each node relative size and the roundRobin would take advantage of this information to generate the right amount of load for each target.
I have no idea how this would look and how it should be specified.
I think a simpler algorithm that could have a similar effect is the best (least) of N choices, but we would need to have data per backend in lbcontext for the lb algorithm.
@ruiaraujo I added your suggestion to the list
I would like to work on "least requests". Because round robin does not uniformly distribute traffic between nodes especially if long active connections exist. Do you have any concern or objection before that? @szuecs
As discussed in slack there is https://github.com/zalando/skipper/pull/1507 that you can test or also check the code to make a new PR, if you like.