Skip to content

[RR & WRR] start connecting to endpoints from a random start index#40235

Closed
markdroth wants to merge 8 commits intogrpc:masterfrom
markdroth:rr_random_connection_attempt_start_index
Closed

[RR & WRR] start connecting to endpoints from a random start index#40235
markdroth wants to merge 8 commits intogrpc:masterfrom
markdroth:rr_random_connection_attempt_start_index

Conversation

@markdroth
Copy link
Copy Markdown
Member

b/412468630

endpoints_.push_back(
create_endpoint(Ref(DEBUG_LOCATION, "Endpoint"), endpoint, args));
});
return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will doing std::shuffle() once on endpoints_ simply work?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@markdroth markdroth deleted the rr_random_connection_attempt_start_index branch July 18, 2025 15:13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants