[RR & WRR] start connecting to endpoints from a random start index#40235
Closed
markdroth wants to merge 8 commits intogrpc:masterfrom
Closed
[RR & WRR] start connecting to endpoints from a random start index#40235markdroth wants to merge 8 commits intogrpc:masterfrom
markdroth wants to merge 8 commits intogrpc:masterfrom
Conversation
eugeneo
approved these changes
Jul 17, 2025
yousukseung
approved these changes
Jul 17, 2025
| endpoints_.push_back( | ||
| create_endpoint(Ref(DEBUG_LOCATION, "Endpoint"), endpoint, args)); | ||
| }); | ||
| return; |
Contributor
There was a problem hiding this comment.
Will doing std::shuffle() once on endpoints_ simply work?
Member
Author
There was a problem hiding this comment.
We don't actually want to shuffle the order, since RR is supposed to honor that order when sending RPCs. All we want to do is start connecting from a random index.
asheshvidyut
pushed a commit
to asheshvidyut/grpc
that referenced
this pull request
Jul 22, 2025
…rpc#40235) b/412468630 Closes grpc#40235 COPYBARA_INTEGRATE_REVIEW=grpc#40235 from markdroth:rr_random_connection_attempt_start_index ff45012 PiperOrigin-RevId: 784374126
asheshvidyut
pushed a commit
to asheshvidyut/grpc
that referenced
this pull request
Jul 23, 2025
…rpc#40235) b/412468630 Closes grpc#40235 COPYBARA_INTEGRATE_REVIEW=grpc#40235 from markdroth:rr_random_connection_attempt_start_index ff45012 PiperOrigin-RevId: 784374126
paulosjca
pushed a commit
to paulosjca/grpc
that referenced
this pull request
Aug 23, 2025
…rpc#40235) b/412468630 Closes grpc#40235 COPYBARA_INTEGRATE_REVIEW=grpc#40235 from markdroth:rr_random_connection_attempt_start_index ff45012 PiperOrigin-RevId: 784374126
copybara-service Bot
pushed a commit
that referenced
this pull request
Jan 23, 2026
Enable a change for RR and WRR LB policies to start connecting from a random index in the subchannel list, to avoid sending too much traffic to the first address on the list. See #40235 for original implementation. Closes #41472 COPYBARA_INTEGRATE_REVIEW=#41472 from markdroth:rr_wrr_connect_from_random_index_enable 1000ab3 PiperOrigin-RevId: 860273422
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.
b/412468630