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

wrr: add EDF implementation of weighted round robin. #2957

Merged
merged 3 commits into from
Aug 9, 2019

Conversation

alazarev
Copy link
Contributor

@alazarev alazarev commented Aug 6, 2019

EDF is strictly better than current random based wrr (balancer/internal/wrr/random.go).
It can be used to load balance between balancer groups (balancer/xds/edsbalancer/balancergroup.go) and
within balancer group using weighted round robin balancer implementation (coming in the next pull request for #2827).

@easwars
Copy link
Contributor

easwars commented Aug 6, 2019

I have a pending PR #2950 to refactor the current xds code in grpc/balancer/xds to grpc/xds/balancer.

Do you plan to use the EDF implementation in this PR from outside of xds code? Please let me know.

@alazarev
Copy link
Contributor Author

alazarev commented Aug 6, 2019

@easwars Yes, I'm going to use EDF implementation from balancer/weightedroundrobin/weightedroundrobin.go

@easwars
Copy link
Contributor

easwars commented Aug 6, 2019

Thanks @alazarev for your reply.
I will modify my PR to move current grpc/balancer/internal/wrr to grpc/internal/wrr so that it can be used both from grpc/balancer/weightedroundrobin and grpc/xds/balancer.

easwars added a commit to easwars/grpc-go that referenced this pull request Aug 6, 2019
There is a pending PR (grpc#2957) which
wants to use the wrr package from
balancer/weightedroundrobin/weightedroundrobin.go. Moving the package to
internal/wrr would make it accessible to both xds and balancer code.
@menghanl
Copy link
Contributor

menghanl commented Aug 7, 2019

@alazarev #2950 moved the files/directories. Can you update this PR? Thanks!

EDF is strictly better than current random based wrr (balancer/internal/wrr/random.go).
It can be used to load balance both between balancer groups (balancer/xds/edsbalancer/balancergroup.go) and
within balancer group using weighted round robin balancer implementation (comming in the next pull request for grpc#2827).
@alazarev
Copy link
Contributor Author

alazarev commented Aug 8, 2019

Picked up #2950 changes.

@menghanl menghanl self-assigned this Aug 8, 2019
@menghanl menghanl self-requested a review August 8, 2019 20:06
internal/wrr/edf.go Show resolved Hide resolved
internal/wrr/edf.go Outdated Show resolved Hide resolved
@alazarev
Copy link
Contributor Author

alazarev commented Aug 8, 2019

It looks like CI failure on go1.11 is in internal/transport and not related to PR

@menghanl menghanl changed the title Add EDF implementation of weighted round robin. wrr: add EDF implementation of weighted round robin. Aug 9, 2019
Copy link
Contributor

@menghanl menghanl left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. LGTM.

@menghanl menghanl merged commit b8d2675 into grpc:master Aug 9, 2019
@canguler canguler added the Type: Feature New features or improvements in behavior label Aug 13, 2019
@canguler canguler added this to the 1.23 Release milestone Aug 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants