pick_first weighted shuffle (1.79.x backport)#12634
Merged
ejona86 merged 1 commit intogrpc:v1.79.xfrom Jan 30, 2026
Merged
Conversation
Previously, the number of endpoints in a locality would skew how much traffic was sent to that locality. Also, if endpoints in localities had wildly different weights, that would impact cross-locality weighting. For example, consider: LocalityA weight=1 endpointWeights=[100, 100, 100, 100] LocalityB weight=1 endpointWeights=[1] The endpoint in LocalityB should have an endpoint weight that is half the total sum of endpoint weights, in order to receive half the traffic. But the multiple endpoints in LocalityA would cause it to get 4x the traffic and the endpoint weights in LocalityA causes them to get 100x the traffic. See gRFC A113
kannanjgithub
approved these changes
Jan 28, 2026
This file contains hidden or 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
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.
There's two commits here with descriptions in each; take a look at each individually and I'll keep them separate when merging.
There will be a gRFC for this, but apparently it hasn't been created yet(gRFC A113 grpc/proposal#535) and I didn't want to wait longer for it to be created before starting review, because the plan is to delay the 1.79.0 release for this in Java and Go. We will want to merge this ASAP (and backport at our convenience), but we must wait until the gRFC is merged before publishing the 1.79.0 release. I suggest we leaveTODO:release blockerlabel here until the gRFC is merged. (Kannan, I shared a doc and an email thread with you to give you some context; mostly for what problem is being solved, and not the specific solution here. The specific solution here is split across a lot of comments, so you're best off waiting for the gRFC to see something documenting it.)While doing this I've noticed lots of things to fix with how weights are handled. I've basically ignored them at the moment, only trying to make sure that I don't make things worse. I'll be doing a follow-up to fix more weight handling, but I will not be trying to backport it.
Backport of #12623