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

core: add subchannel list LB commons utility function, refactor for WRR #9875

Merged
merged 6 commits into from
Feb 4, 2023

Conversation

YifeiZhuang
Copy link
Contributor

see details in go/grpc-java-wrr(first part)

@YifeiZhuang YifeiZhuang requested review from temawi and ejona86 February 3, 2023 01:22
@YifeiZhuang YifeiZhuang marked this pull request as ready for review February 3, 2023 01:23
@YifeiZhuang YifeiZhuang changed the title core: add abstractRoundRobinLB, refactor for WRR core: add subchannel list LB commons utility function, refactor for WRR Feb 3, 2023
Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

I expect we'll want to morph this utility in one of two opposite ways:

  1. Have it be more a library that is called. So instead of it calling a function to create the picker the LB would call a method to get the list of subchannels and pass that to a picker
  2. Have it be the full LB, but sort of an adapter to a simplified interface that mainly creates the picker given a list of subchannels.

I think things are still clear enough with this current state that we can move forward and see how things go and see which direction will work out better.

@YifeiZhuang
Copy link
Contributor Author

  1. Have it be the full LB, but sort of an adapter to a simplified interface that mainly creates the picker given a list of subchannels.

For 2 it becomes a ForwardingLoadBalancer delegate to this, isn't it.

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

For 2 it becomes a ForwardingLoadBalancer delegate to this, isn't it.

Actually, I'm thinking even further where it is the LB itself and RRLB goes away and is just a RRSimpleLB or something. The RRProvider would construct the utility as the LB. This approach would basically give us a "simple LB API" that is easy and this utility would be an adapter to the "full LB API." Sure, if needed we could wrap it in a ForwardingLoadBalancer, but that might mean "the approach isn't working."

@YifeiZhuang YifeiZhuang merged commit 5a2adcc into grpc:master Feb 4, 2023
@YifeiZhuang YifeiZhuang deleted the wrr-rr-refactor branch February 4, 2023 01:53
YifeiZhuang added a commit to YifeiZhuang/grpc-java that referenced this pull request Feb 14, 2023
YifeiZhuang added a commit that referenced this pull request Feb 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
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.

2 participants