-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Conversation
There was a problem hiding this 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:
- 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
- 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.
For 2 it becomes a ForwardingLoadBalancer delegate to this, isn't it. |
There was a problem hiding this 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."
see details in go/grpc-java-wrr(first part)