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

Add FULL_SCAN selection mode to least request LB #31507

Merge branch 'main' into least_request_lb_enable_full_scan_mode

825bd5b
Select commit
Loading
Failed to load commit list.
Merged

Add FULL_SCAN selection mode to least request LB #31507

Merge branch 'main' into least_request_lb_enable_full_scan_mode
825bd5b
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Release validation skipped Feb 6, 2024 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/31507/main@825bd5b)

jkirschner-hashicorp @jkirschner-hashicorp 825bd5b #31507 merge main@6ef9425

Add FULL_SCAN selection mode to least request LB

Commit Message: Add FULL_SCAN mode to least request load balancer.

By default, the least request load balancer returns the host with the fewest
active requests from a set of N randomly selected hosts.

This introduces a new "full scan" selection method that returns the host with
the fewest number of active requests from all hosts. If multiple hosts are
tied for "least", one of the tied hosts is randomly chosen.

Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:

Added selection_method option to the least request load balancer. If set to FULL_SCAN, Envoy will select the host with the fewest active requests from the entire host set rather than choice_count random choices.

Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]


This PR is a successor to #31146 and other efforts related to added a full scan mode to the least request load balancer.

This approach preserves automatically using full scan mode when choice_count > number_of_hosts. That functionality was previously removed in #30794 because it caused the first host to always be selected if cluster stats were disabled. However, that justification no longer applies because the start index of the full scan is now randomized.

Many thanks to @barroca for initiating this effort and getting it most of the way to the finish line.

Environment

Request variables

Key Value
ref 39b0445d6277a841b080e8ac4e041c866c487e96
sha 825bd5b
pr 31507
base-sha 6ef9425
actor jkirschner-hashicorp @jkirschner-hashicorp
message Add FULL_SCAN selection mode to least request LB...
started 1707237690.447336
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default envoyproxy/envoy-build-ubuntu:0ca52447572ee105a4730da5e76fe47c9c5a7c64
mobile envoyproxy/envoy-build-ubuntu:mobile-0ca52447572ee105a4730da5e76fe47c9c5a7c64
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 30
patch 0
dev true