-
Notifications
You must be signed in to change notification settings - Fork 662
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
grpc-js-xds: Implement ring_hash LB policy #2568
Merged
murgatroid99
merged 14 commits into
grpc:master
from
murgatroid99:grpc-js-xds_ring_hash
Sep 13, 2023
Merged
grpc-js-xds: Implement ring_hash LB policy #2568
murgatroid99
merged 14 commits into
grpc:master
from
murgatroid99:grpc-js-xds_ring_hash
Sep 13, 2023
+1,746
−218
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The interop test passed in this run |
gnossen
approved these changes
Sep 13, 2023
murgatroid99
added a commit
to grpc/grpc
that referenced
this pull request
Sep 15, 2023
Similar to #34146, this will only run on master for now. This will work after grpc/grpc-node#2568 is merged.
sergiitk
pushed a commit
to grpc/psm-interop
that referenced
this pull request
Nov 8, 2023
Similar to #34146, this will only run on master for now. This will work after grpc/grpc-node#2568 is merged.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements gRFC A42: xDS Ring Hash LB Policy, with modifications described in gRFC A61 (grpc/proposal#356).
In addition to the changes specified in A42, I had to make the following changes to get ring_hash to work:
channelId
argument, to be hashed in the "CHANNEL_ID" hash policy.xxhash-wasm
dependency has been added.Awaited
utility type used in the loader code forxxhash-wasm
.ResolvingLoadBalancer
,XdsClusterManagerLoadBalancer
, andPriorityLoadBalancer
now consistently delegate to the child when in a connectivity state other thanREADY
.Note: Hash generation only works on Node 15+, because that is when support for
bigint
representations of 64 bit integers from WASM modules was introduced. If the feature is enabled by the environment variable, the library will not work at all on Node 14 and below. For reference, Node 16 is currently the lowest supported LTS version.Experimental API changes:
EndpointMap
, an implementation of severalMap
APIs that considersEndpoint
equality based on the unordered set of addresses. Not efficient.ConfigSelector
function signature has an additional argumentchannelId: number
, which is randomly generated for each channel, and has a consistent value for the lifetime of the channel. Implementations that don't use it can ignore it.QueuePicker
class has an additional optional argumentchildPicker: Picker
, which theQueuePicker
instance will delegate to if provided.