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

NOTICE: Upcoming API changes to experimental Name Resolver (resolver) and LB Policy (balancer) packages #6472

Open
4 of 13 tasks
dfawley opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
P2 Type: API Change Breaking API changes (experimental APIs only!)

Comments

@dfawley
Copy link
Member

dfawley commented Jul 24, 2023

To support the upcoming IPv4/IPv6 Dualstack design (gRFC A61), some changes will be required in the resolver and balancer. 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)
    • The default pick_first LB policy will perform the "happy eyeballs" algorithm (RFC8305) to establish a connection
    • Update every leaf LB policy to use pick_first as its child to handle endpoint connections
    • Internally change the implementation of health checking so it applies in pick_first instead of inside the SubConn
  • General improvements / cleanups

    • Provide SubConn state updates via a callback instead of by calling balancer.UpdateSubConnState (balancer: add StateListener to NewSubConnOptions for SubConn state updates #6481)
    • Deprecate ClientConn.RemoveSubConn and add balancer.SubConn.Shutdown as its replacement (balancer: add SubConn.Shutdown; deprecate Balancer.RemoveSubConn #6493)
      • Remove ClientConn.RemoveSubConn
    • Deprecate resolver.Address.BalancerAttributes and add resolver.Endpoint.Attributes as its replacement (resolver: State: add Endpoints and deprecate Addresses #6471)
      • Remove resolver.Address.BalancerAttributes
    • Remove resolver.Address.Metadata.
      • The State.Attributes or Endpoint.Attributes fields should be used to communicate between resolver and LB policy. The Address.Attributes field should be used to communicate with the transport layer.
    • Remove the ability to specify multiple addresses per SubConn
    • Remove SubConn.UpdateAddresses and ClientConn.UpdateAddresses
    • Introduce requirement that LB policies that create SubConns be responsible for shutting them down when Balancer.Close is called.
      • Note that with pick_first as the universal leaf policy, only pick_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.

@dfawley dfawley added the Type: API Change Breaking API changes (experimental APIs only!) label Jul 24, 2023
@dfawley dfawley self-assigned this Jul 24, 2023
@dfawley dfawley pinned this issue Jul 24, 2023
@dfawley dfawley changed the title NOTICE: Upcoming Name Resolver (resolver) and LB Policy (balancer) experimental API changes NOTICE: Upcoming API changes to experimental Name Resolver (resolver) and LB Policy (balancer) packages Jul 24, 2023
@dfawley dfawley added the P2 label Jul 25, 2023
@dfawley dfawley added this to Blockers in Promote Resolver/Balancer API to Stable via automation Jul 28, 2023
@ginayeh ginayeh unpinned this issue Sep 22, 2023
@dfawley dfawley pinned this issue Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Type: API Change Breaking API changes (experimental APIs only!)
Development

No branches or pull requests

1 participant