NOTICE: Upcoming API changes to experimental Name Resolver (resolver
) and LB Policy (balancer
) packages
#6472
Labels
Area: Resolvers/Balancers
Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities.
P2
Type: API Change
Breaking API changes (experimental APIs only!)
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 connectionpick_first
as its child to handle endpoint connectionspick_first
instead of inside theSubConn
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: