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

xds: explicitly set request hash key for the ring hash LB policy #11881

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

danielzhaotongliu
Copy link
Collaborator

@danielzhaotongliu danielzhaotongliu commented Feb 4, 2025

Implements gRFC A76: explicitly setting the request hash key for the ring hash LB policy

  • Explictly setting the request hash key is guarded by the GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY environment variable until API stabilized.

Tested:

  • Verified end-to-end by spinning up multiple gRPC servers and a gRPC client that injects a custom service (load balancing) config with ring_hash_experimental and a custom request_hash_header (with NO associated value in the metadata headers) which generates a random hash for each request to the ring hash LB. Verified picks/RPCs are split evenly/uniformly across all backends.
  • Ran affected unit tests with thread sanitizer and 1000 iterations to prevent data races.

CC: @shivaspeaks

@danielzhaotongliu danielzhaotongliu marked this pull request as ready for review February 7, 2025 00:44
@shivaspeaks shivaspeaks added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 7, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants