-
Notifications
You must be signed in to change notification settings - Fork 4.5k
NOTICE: Upcoming API changes to experimental Name Resolver (resolver
) and LB Policy (balancer
) packages
#6472
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
Comments
resolver
) and LB Policy (balancer
) experimental API changesresolver
) and LB Policy (balancer
) packages
I think we can check off more of these items, right @arjan-bal ? Some or all of the remaining items may need to wait for things like etcd still using |
I've checked off the items that are complete. We need to wait for the the old pickfirst to be removed before we can remove some deprecated APIs, and health check code in the channel. We may be able to work on the requirement for LB policies to close their channel. |
To support the upcoming IPv4/IPv6 Dualstack design (gRFC A61), some changes will be required in the
resolver
andbalancer
. We will also be taking this opportunity to streamline the APIs a bit, in particular improving the LB policy API to make it easier to build and manage child LB policies (used extensively for our xDS support).The design is not finalized, however, the following changes are currently planned:
Dualstack support:
Add an abstraction for "endpoints" in resolver results, which will each contain a list of addresses (resolver: State: add Endpoints and deprecate Addresses #6471)pick_first
LB policy will perform the "happy eyeballs" algorithm (RFC8305) to establish a connection (pickfirst: Implement Happy Eyeballs #7725, pickfirst: Interleave IPv6 and IPv4 addresses for happy eyeballs #7742)Update every leaf LB policy to usepick_first
as its child to handle endpoint connectionsleastrequest (leastrequest: Delegate subchannel creation to pickfirst #7969)weighted_round_robin (balancer/weightedroundrobin: Switch Weighted Round Robin to use pick first instead of SubConns #7826)roundrobinringhashInternally change the implementation of health checking so it applies inpick_first
instead of inside theSubConn
(balancer: Add a SubConn.RegisterHealthListener API #7780, pickfirst: Register a health listener when used as a leaf policy #7832, health, grpc: Deliver health service updates through the health listener #7900)General improvements / cleanups
ProvideSubConn
state updates via a callback instead of by callingbalancer.UpdateSubConnState
(balancer: add StateListener to NewSubConnOptions for SubConn state updates #6481)DeprecateClientConn.RemoveSubConn
and addbalancer.SubConn.Shutdown
as its replacement (balancer: add SubConn.Shutdown; deprecate Balancer.RemoveSubConn #6493)ClientConn.RemoveSubConn
Deprecateresolver.Address.BalancerAttributes
and addresolver.Endpoint.Attributes
as its replacement (resolver: State: add Endpoints and deprecate Addresses #6471)resolver.Address.BalancerAttributes
resolver.Address.Metadata
.State.Attributes
orEndpoint.Attributes
fields should be used to communicate between resolver and LB policy. TheAddress.Attributes
field should be used to communicate with the transport layer.SubConn
SubConn.UpdateAddresses
andClientConn.UpdateAddresses
SubConn
s be responsible for shutting them down whenBalancer.Close
is called.pick_first
as the universal leaf policy, onlypick_first
will need to be updated to do this.We will do our best to make these changes in a way that allows several releases / months between adding the new version of an API and removing the old version.
Please keep in mind that all these APIs are still experimental, even the newly added ones. Until we can guarantee long-term support for them, they will remain this way. Note that any packages outside this repo that use an experimental symbol or import an experimental package should be considered experimental themselves, as the removal of a symbol would break compilation of that entire package.
The text was updated successfully, but these errors were encountered: