Add Peak EWMA load balancer (contrib) #6690
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This LB algorithm uses the peak exponentially-weighted moving average based on round-trip time (RTT) and outstanding requests to prefer targets resulting in low request latency and to respond to changes quickly. Peak EWMA is also well-suited for cross-data-center routing: it naturally prefers upstream hosts in the closest data center, but seamlessly fails over to other data centers during slowdowns (and fails back when performance recovers). In scenarios where all upstream hosts have similar request latency, Peak EWMA behaves equivalently to equal-weighted least request load balancing (using P2C selection).
Adding this contrib extension allows for evaluation of the potential for Istio service-meshes via EnvoyFilters.
Which issue this PR fixes
Special notes for your reviewer:
This is simply adding the great work of @rroblak to the Envoy build that is Istio-Proxy.
See his feature issue and PRs
or maybe https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency/ for some background on why this algo is a great addition.
There also other Issues/PRs for other proxies discussing or adding it:
HAProxy
NGINX
Linkerd
Alibaba Cloud