envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.95k stars 4.8k forks source link

JIQ Load Balancing #2044

Open toaler opened 6 years ago

toaler commented 6 years ago

It looks like Envoy currently implements Power-of-two load balancing (Weighted Least Request). Is there any plans to implement JIQ load balancing?

Based on the research [1] JIQ has advantages of Power-of-two. Has this been something considered to date? If a contributor is looking at add yet-another-LB-algorithm, what part of the code base should they start to look at?

[1] https://www.microsoft.com/en-us/research/wp-content/uploads/2011/10/idleq.pdf

mattklein123 commented 6 years ago

I haven't seen that one yet. Will read the paper.

Adding a new LB is pretty easy. See here for examples: https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/load_balancer_impl.h https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/ring_hash_lb.h

toaler commented 6 years ago

Cheers @mattklein123 will look at the code.