Fix least request lb not fair (#29873)

* Add new idea for selecting hosts among those not selected yet.

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Change how we choose full table scan

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Remove cout

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Fix Tests for load_balancer_impl_test

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Fix format and make sure full scan happens only when selected or the number of choices is larger than the size.

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Enable new option on extesions api only

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Fix Integration tests.

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Add release notes for full scan in least request LB.

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Fix ref for release note.

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Fix release notes

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

* Update release note

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>

---------

Signed-off-by: Leonardo da Mata <ldamata@spotify.com>
Signed-off-by: Leonardo da Mata <barroca@gmail.com>
Co-authored-by: Leonardo da Mata <ldamata@spotify.com>

Mirrored from https://github.com/envoyproxy/envoy @ 3ea2bc40590c1a48f26e8297ae55d7a6d08083e9
main
update-envoy[bot] 1 year ago
parent dab84a62e2
commit ea643c6f30
  1. 6
      envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto

@ -22,6 +22,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information.
// [#next-free-field: 6]
message LeastRequest {
// The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
@ -58,4 +59,9 @@ message LeastRequest {
// Configuration for local zone aware load balancing or locality weighted load balancing.
common.v3.LocalityLbConfig locality_lb_config = 4;
// Configuration for performing full scan on the list of hosts.
// If this configuration is set, when selecting the host a full scan on the list hosts will be
// used to select the one with least requests instead of using random choices.
google.protobuf.BoolValue enable_full_scan = 5;
}

Loading…
Cancel
Save