-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Upcoming experimental Balancer API changes #4207
Comments
still remember the pain of etcd. Hope this change would not cause another disaster. |
To align better with gRPC-Java's LB policy API, and to simplify the effort required to implement LB policies in a hierarchy, we will be making these changes in the opposite direction from what was originally proposed in this issue. Namely:
I hope so too. The package is and always has been clearly labeled as experimental, meaning no backward compatibility guarantees are promised, but big scary warnings apparently don't prevent library developers from using it anyway. |
Is there a projected timeline for when the |
Unfortunately not. The Java API is also still experimental, and C++ still doesn't have a public API for this at all. We would want to do this all together so we can be sure we have a consistent set of features available (or at least possible) for our users. The changes we're proposing here will bring us more in line with Java, so that should help to make this happen sooner. |
The balancer API uses important pieces of functionality provided by gRPC via the following interfaces: balancer.ClientConn and balancer.SubConn.
While the
balancer.ClientConn
interface provides the functionality to create and delete abalancer.SubConn
, the functionality to modify the addresses of an existingbalancer.SubConn
is provided by thebalancer.SubConn
interface itself. This asymmetry create an unnecessary pain-point for LB policy implementations in a setup with a tree of LB policies.The proposed API change here is as follows:
balancer.ClientConn
interface by providing a way to update addresses of an existingbalancer.SubConn
.UpdateAddresses
method on thebalancer.SubConn
interface, which would then provide a singleConnect()
method.The plan would be as follows:
UpdateAddresses()
tobalancer.ClientConn
as part of the1.37.x
release.UpdateAddresses()
frombalancer.SubConn
in a future release. Maybe1.38.x
or a subsequent one.UpdateAddresses()
will be removed inv1.39.x
While these changes are not strictly following semantic versioning or the Go compatibility promise, they are in accordance with our versioning policy as the changes are limited to experimental APIs.
The text was updated successfully, but these errors were encountered: