Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Balancer group balancing from Random to EDF #2965

Closed
wants to merge 1 commit into from

Conversation

alazarev
Copy link
Contributor

@alazarev alazarev commented Aug 9, 2019

EDF is strictly better than random.

This is continuation of #2957.

EDF is strictly better than random
// RandomWRR constructor, to be modified in tests.
var newRandomWRR = wrr.NewRandom
// WRR constructor, to be modified in tests.
var newWRR = wrr.NewEDF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RandomWRR is the behavior agreed on by all implementations of different gRPC languages. We cannot change the default.
We can make it configurable so you can override it in your client.

Changing the algorithm will also be easier in the future as there are also plans to support different locality picking algorithms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this discussion public? It looks a bit strange that gRPC uses different algorithm compared to Envoy (which uses EDF for this exact scenario)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The xds gRFC is not public yet.

Is there any specific reason you care so much about this picking algorithm?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to switch to EDF to be consistent with envoy, we should do that in all languages. I will bring this up with them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We care for endpoint lb (as edf provides fair distribution of the load across endpoints as in opposite to ≈random one).
For cross-zone lb we don't care that much (as number of zones is not that big) and the main/only motivator is consistency with other data plane (envoy).

@menghanl
Copy link
Contributor

Closing this PR for now, as it's not decided whether we will want it yet.
Locality picking algorithm will need more discussion. Will revisit once there's a decision.

@menghanl menghanl closed this Oct 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants