Skipper: loadbalancer algorithms

Created on 23 Feb 2018  路  7Comments  路  Source: zalando/skipper

  • #536 implemented a loadbalancer feature with only roundrobin algorithm.
  • After #556 we should have a solid code base to easily implement different algorithms per route.

We want to have some other algorithms being possible and able to choose per route (for example from ingress). Algorithm ideas we could support:

least of N choices background

Data to compare to select the least of N choices (https://medium.com/netflix-techblog/netflix-edge-load-balancing-695308b5548c):

  1. Client Health: rolling percentage of connection-related errors for that server.
  2. Server Utilization: most recent score provided by that server.
  3. Client Utilization: current number of inflight requests to that server from this load balancer.
help wanted optimization

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrickdk77 picture patrickdk77  路  7Comments

herojan picture herojan  路  7Comments

mikkeloscar picture mikkeloscar  路  6Comments

addityasingh picture addityasingh  路  4Comments

daviddyball picture daviddyball  路  6Comments