Skip to content

Conversation

Zgoda91
Copy link

@Zgoda91 Zgoda91 commented Sep 24, 2025

implementing gRFC A65 grpc/proposal/pull/423

This change contains:

  1. Relocation of XxHash64 library, so it can be shared between util and xds projects. Proposed source directory is: third-party/zero-allocation-hashing. Usage of murmur3_128 hashing algorithm from Guava library.
  2. Implementation of RandomSubsettingLoadBalancer and RandomSubsettingLoadBalancerProvider classes and integration into the util project.
  3. Implementation of xDS conversion function for random_subsetting LB policy and as well new envoy proto message.

@Zgoda91 Zgoda91 force-pushed the A68_random_subsetting branch from 9178308 to aefee00 Compare September 24, 2025 12:26
@Zgoda91 Zgoda91 force-pushed the A68_random_subsetting branch from aefee00 to 1870e6f Compare September 24, 2025 13:57
@Zgoda91
Copy link
Author

Zgoda91 commented Oct 6, 2025

@ejona86 - PR updated

@ejona86
Copy link
Member

ejona86 commented Oct 6, 2025

CC @s-matyukevich, @joybestourous

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sending what I have. I expect I'll have a few more comments, but I suspect nothing that impacts the changes for these comments.

@Zgoda91
Copy link
Author

Zgoda91 commented Oct 7, 2025

@ejona86 - PR updated.

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to stare at BackendDetails a bit to see what's going on there with the Answer, but sending what I have.

Long subsetSize = JsonUtil.getNumberAsLong(rawConfig, "subsetSize");
if (subsetSize == null) {
return ConfigOrError.fromError(
Status.INTERNAL.withDescription(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be UNAVAILABLE. INTERNAL isn't appropriate, because nothing in gRPC was busted; this was just wrong configuration. I suspect you probably copied this from OutlierDetectionLoadBalancerProvider, which itself is wrong. There's really no difference here than on line 57 if we get a RuntimeException. #12409 will fix that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was looking at other providers code and as well old java solution to understand which Status I am supposed to use.

Does the same apply to child policy parsing? I can see that GracefulSwitchLoadBalancer.parseLoadBalancingPolicyConfig(...) is using INTERNAL to represent parsing failures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the file to

FILES=(
envoy/admin/v3/config_dump.proto
envoy/admin/v3/config_dump_shared.proto
envoy/annotations/deprecation.proto
envoy/config/accesslog/v3/accesslog.proto

And re-run the script to download the same version as the rest of the Envoy commit we are using.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it seems like there is nothing like random_subsetting LB policy in envoy. The closest seems random or subset, but those aren't what we exactly need.

How should I tackle this problem? Should I update the envoy API before merging this PR then?

@Zgoda91
Copy link
Author

Zgoda91 commented Oct 8, 2025

@ejona86 - pushed changes. However, I do have two questions, which I have posted as answers to your comments.

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.

2 participants