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

Is balancer api v2 stable? #1579

Closed
Civil opened this issue Oct 16, 2017 · 5 comments
Closed

Is balancer api v2 stable? #1579

Civil opened this issue Oct 16, 2017 · 5 comments
Assignees

Comments

@Civil
Copy link

Civil commented Oct 16, 2017

I'm trying to write a client-side load balancer for gRPC, but in current version of docs it's a little bit confusing:

  1. grpc.WithBalancer marked as deprecated with a comment "use grpc/balancer pkg instead"
  2. "grpc/balancer" have almost no documentation about how to use it. And also marked as "Experimental"
  3. grpc.WithBalancerBuilder marked as "is for testing only."with a suggestion to use ServiceConfig.
  4. ServiceInfo struct marked as "This is EXPERIMENTAL and subject to change."

I'm confused about what should I use.

@menghanl
Copy link
Contributor

menghanl commented Oct 16, 2017

The new balancer APIs are in progress (#1388).
There are multiple pending PRs (including #1515, #1551 and #1558) in review.

Eventually, users should use service config to pick the balancer to use. But as the work to support service config is still in progress, there needs to be some way to test balancer implementations. And that's what grpc.WithBalancerBuilder is for.
We don't want users to use this in production (because there should be a way for service owners to switch balancer for its clients), so it's marked as testing only.

We expect this new balancer APIs to be stable, but we will still mark it as "EXPERIMENTAL" for some time before we are confident enough.

As for what you should use right now:
Please use the new balancer APIs as in the balancer package. The roundrobin implementation and test can work as an example of how to do it right now.

@xiang90
Copy link
Contributor

xiang90 commented Oct 16, 2017

one related question: how should we provide feedbacks on the new balancer API?

@Civil
Copy link
Author

Civil commented Oct 17, 2017

Am I right that currently specifying balancer with "ServiceConfig" is not implemented and for now I should use "WithBalancerBuilder" with the aim to switch to ServiceConfig as soon as corresponding PRs will be merged?

@menghanl
Copy link
Contributor

@xiang90 You can send comments to the discussion link for the gRFC. Or simply file an issue in our repo.

@Civil Yes.

@menghanl
Copy link
Contributor

Closing this issue. Please track the process in #1388.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants