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

[resolver and LB policy APIs] change address list to support multiple addresses per endpoint #33567

Merged
merged 220 commits into from
Sep 28, 2023

Conversation

markdroth
Copy link
Member

@markdroth markdroth commented Jun 28, 2023

More changes as part of the dualstack design:

  • Change resolver and LB policy APIs to support multiple addresses per endpoint. Specifically, replace ServerAddress with EndpointAddresses, which encodes more than one address. Per-address channel args are retained at the same level, so they are now per-endpoint. For now, EndpointAddress provides a single-address ctor and a single-address accessor for backward compatibility, so ServerAdress is an alias for EndpointAddresses; eventually, this alias and the single-address methods will be removed.
  • Add an EndpointAddressSet class, which represents an unordered set of addresses to be used as a map key. This will be used in a number of LB policies that need to store per-endpoint state.
  • Change the LB policy API's ChannelControlHelper::CreateSubchannel() method to take the address and per-endpoint channel args as separate parameters, so that we don't need to construct a legacy ServerAddress object as we create a new subchannel for each address in the endpoint.
  • Change pick_first to flatten the address list.
  • Change ring_hash to use EndpointAddressSet as the key for its endpoint map, and to use the first address of the endpoint as the hash key.
  • Change WRR to use EndpointAddressSet as the key for its endpoint weight map.

Note that support for multiple addresses per endpoint is guarded in RR by the existing round_robin_delegate_to_pick_fist experiment and in WRR by the existing wrr_delegate_to_pick_first experiment.

This PR does not include support for multiple addresses per endpoint for the outlier_detection or xds_override_host LB policies; those will come in subsequent PRs.

markdroth and others added 30 commits March 23, 2023 17:58
@markdroth markdroth merged commit fd2e8c9 into grpc:master Sep 28, 2023
69 of 70 checks passed
markdroth added a commit that referenced this pull request Sep 28, 2023
…multiple addresses per endpoint (#33567)"

This reverts commit fd2e8c9.
yashykt pushed a commit that referenced this pull request Sep 28, 2023
…multiple addresses per endpoint" (#34527)

Reverts #33567 due to import problems.
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 28, 2023
markdroth added a commit that referenced this pull request Sep 28, 2023
…multiple addresses per endpoint (#34531)

Re-land #33567, which was reverted in #34527.

First commit is a pure revert, second commit is a small fix needed to
avoid breaking internal callers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bloat/low imported Specifies if the PR has been imported to the internal repository lang/c++ lang/core per-call-memory/neutral per-channel-memory/neutral release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants