---
title: "Envoy Least Request: Sampled Hosts, Full Scan and Weighted State"
description: "Leviathan Systems — Technical content Published 2026-10-22; updated 2026-10-22."
canonical: "https://www.leviathansystems.co/articles/envoy-least-request-sampled-weighted-host-selection"
last-updated: "2026-10-22"
---

# Envoy Least Request: Sampled Hosts, Full Scan and Weighted State

Leviathan Systems — Technical content
Published 2026-10-22; updated 2026-10-22.

In LR64's supplied Envoy v1.35.0 state, N_CHOICES with draws A/B selects B, applicable unweighted FULL_SCAN selects C, and the separate weighted EDF schedule selects A, then reinserts A at virtual key 7/2. Only C meets the example's complete-source minimum-count requirement. Determining the next backend requires the actual selection branch and its state; current effective weights alone cannot identify the weighted next pick.

## Identify the applicable branch before judging a backend return

This explanation follows the historical Envoy v1.35.0 LeastRequest extension interface and implementation, checked October 22, 2026. A supplier must identify the actual release, available interface and applicable implementation in its offer. The name least request does not supply that information.

The extension defines N_CHOICES and FULL_SCAN, with choice_count applying to N_CHOICES. Those methods govern the unweighted selection path. The base uses an earliest-deadline-first (EDF) scheduler through pickAndAdd when that scheduler is prepared.

In the base's refresh logic, equal configured host weights together with no hosts in slow start allow EDF creation to be skipped. Equal weights alone are insufficient: slow start can retain an EDF path. LR64 excludes slow start throughout. A FULL_SCAN field must therefore not be treated as overriding the separate prepared weighted scheduler.

The LeastRequest header also identifies the cached active-request bias and its refresh relationship. The example supplies the effective bias used by its weighted branch; it assumes no runtime change.

References: [E2](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/api/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto), [E4](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.h), [E5](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/common/load_balancer_impl.cc)

## LR64 fixes three eligible hosts and two different requirements

LR64 is an original fictional comparison of supplied selection states. One already-selected upstream host source contains exactly three live eligible hosts, A, B and C. Priority, locality, health, model compatibility and request authorization are independently stipulated satisfied. The selection exercise does not establish those premises.

At the selection point, the local per-host rq_active values are A = 9 requests, B = 3 requests and C = 0 requests. Every count is supplied. There are no host changes, slow start or concurrent count changes during each isolated comparison. The complete source here means this stipulated three-host source, rather than every host in a wider deployment.

Requirement P asks whether a returned backend follows the named historical branch and supplied state. Requirement M separately asks for a host with the smallest supplied active-request count across that complete source. C is the unique minimum for M.

These requirements permit different conclusions. A return can satisfy P while missing M. All numbers, draws and scheduler entries below are premises for source-reading arithmetic; no Envoy execution, simulation, load test or provider measurement produced them.

## N_CHOICES selects B from A/B and A from A/A

First give A, B and C equal configured weights of 1, with no slow start and the applicable unweighted N_CHOICES method. Supply choice_count = 2 and the actual draw sequence A, then B.

The first draw makes A the candidate with 9 active requests. The second supplies B with 3. Because 3 is smaller than 9, B replaces A and is returned. Return E therefore satisfies P for this supplied sample. It misses M because C's supplied zero is smaller than B's 3.

Now change only the supplied draws to A, then A. The implementation obtains a host index on every iteration without excluding previous draws. The second A supplies no lower count, so A remains the candidate and is returned with 9. Two iterations have considered only one distinct host.

This repeated-draw return also follows its specified mechanism. Asking why it did not choose B would assume a distinct-host rule absent from that loop. Neither result supplies a probability or a long-run traffic distribution; the draw sequences are already given.

References: [E2](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/api/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto), [E3](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.cc)

## FULL_SCAN returns C for the complete-source minimum

Keep the same three hosts, counts, equal configured weights and no-slow-start premises. Change the applicable unweighted method to FULL_SCAN.

The implementation visits the source's host vector. Comparing 9, 3 and 0 leaves C as the unique minimum. Return F selects C and satisfies both P for this branch and M for this fixed snapshot. There is no tie to resolve in LR64.

E's B and F's C consequently answer different selection mechanisms over the same known source. Knowing that C exists does not make E's supplied sample include it. Conversely, describing F as merely another two-draw result would omit the mechanism that establishes its complete-source comparison.

This is a comparison of stipulated returns, without recommending a method or extending this interface to other releases or builds.

References: [E2](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/api/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto), [E3](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.cc)

## Unequal configured weights give the scheduler dynamic weights

Consider a separate weighted branch. Its configured weights are A = 4, B = 2 and C = 1, its active_request_bias is 1, and its EDF schedule is already prepared. Retain the same active-request counts and no slow start.

The v1.35.0 overview gives the dynamic-weight relationship: configured host weight divided by (active requests + 1) raised to the bias. LR64's current effective weights are therefore A: 4/(9 + 1) = 2/5; B: 2/(3 + 1) = 1/2; and C: 1/(0 + 1) = 1.

These quantities have separate roles. Configured weights are the supplied 4/2/1 inputs. Active counts are the supplied request observations. Effective weights are calculated from those two inputs and the bias. Pending scheduler keys are additional stored state.

C has the largest current effective weight. That numerical ordering does not yet choose the next entry from an existing schedule. Nor are these three weights declared probabilities, GPU capacities or response-time estimates.

References: [E1](https://www.envoyproxy.io/docs/envoy/v1.35.0/intro/arch_overview/upstream/load_balancing/load_balancers), [E4](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.h)

## Stored EDF keys select A, then reinsert it at 7/2

Independently supply this existing internal state: current virtual time is 0; there is one live pending entry per host, with keys A = 1, B = 2 and C = 3; and the prepick list is empty. The keys are virtual scheduling quantities, not request deadlines or elapsed seconds.

These entries are stipulated directly. They are not calculated from LR64's current counts, attributed to default initialization or claimed to have arisen from a real run. Their origin need not be invented to read the supplied snapshot.

With no prepicked entry to return, the scheduler removes the earliest live pending entry. A's key 1 precedes B's 2 and C's 3, so Return W selects A. The scheduler's virtual time advances to 1. A's current effective weight is then used for reinsertion.

The new A key is 1 + 1/(2/5) = 1 + 5/2 = 7/2, or 3.5. The remaining pending order is B at 2, C at 3 and reinserted A at 3.5. The reciprocal-weight term controls A's reinsertion spacing; it preserves B's and C's pending positions.

If exactly these counts and live entries persist, with no intervening pick, prepick or refresh, the next pick is B at 2. This conditional continuation does not assume that a selected request increments a count or finishes; the unchanged counts are an explicit premise.

Remove the supplied pending state and the effective weights remain calculable, but the deterministic next backend is underdetermined. Replacing that missing state with a largest-weight rule would incorrectly select C for the complete weighted case above.

References: [E5](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/common/load_balancer_impl.cc), [E6](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/common/upstream/edf_scheduler.h)

## Choose the evidence that answers the requested selection

The four returns below all follow their respective stipulated mechanisms. Only F returns the minimum-count host across LR64's complete source. W is sufficient for the weighted scheduling requirement even though it returns A with 9 active requests. A promise to follow that schedule and a promise to return the current complete-source minimum are different purchases.

For an actual offer, ask the appointed platform owner to connect the release and interface to the selected eligible host source, the local count definitions and observation point, and the branch actually used. A sampled explanation needs its draws to reproduce a particular pick. A prepared weighted explanation needs applicable pending state and prepick status, alongside the weight and bias inputs. A list of current weights leaves W's decisive evidence absent.

The scope ends at backend selection. A selected destination establishes no transmission, computation or completed response. Local active-request counts also supply no GPU-execution, fairness, latency or capacity result. Broader routing architecture and operating-policy decisions require their own assessment.

LR64: mechanism compliance and the separate minimum-count requirement
| Supplied return | Applicable mechanism and decisive state | Selected backend / active requests | Meets M across A/B/C? | Source |
| --- | --- | --- | --- | --- |
| E | Unweighted N_CHOICES; two draws A/B | B / 3 | No; C has 0. | Planning analysis |
| Repeated-draw countercase | Unweighted N_CHOICES; two draws A/A | A / 9 | No; C has 0. | Planning analysis |
| F | Unweighted FULL_SCAN of the complete source | C / 0 | Yes; unique minimum. | Planning analysis |
| W | Prepared EDF; empty prepick list; live keys A1/B2/C3 | A / 9 | No; its next-pick obligation follows stored state. | Planning analysis |
All states and returns are fictional. E and F use configured weights 1/1/1; W separately uses 4/2/1 and bias 1. Slow start is excluded. W reinserts A at 7/2.

## Use neighboring evidence for the decisions around selection

The related HTTP/2 guide separates connection stream occupancy from inference batch membership. The replica/node guide distinguishes desired workload growth from worker provisioning. Neither quantity selects LR64's backend.

Readiness and endpoint-departure evidence establish a different part of the request path. LR64 starts with eligibility already settled; the endpoint-termination guide follows requests accepted earlier. The gauge guide addresses missing observations, whereas LR64 expressly supplies all three local counts.

Use the authorization and model-release guides if permission or compatible release identity is unresolved. Those are prerequisites to establish for the actual application, rather than outcomes inferred from the winning host. Keeping these decisions connected lets each supplier substantiate its own responsibility.

## Scope equipment preparation only when it is independently needed

This selection comparison creates no equipment requirement. If the wider project independently needs receiving, preparation or rack assembly, Leviathan's Rack Assembly & Preparation service and related project inquiry address that physical package.

Share a nonconfidential equipment and configuration summary, appointed supplier, proposed location, permitted physical tasks and required handoff to discuss scope, resources and availability. Routing administration, inference serving, model hosting, software integration and commissioning remain with separately appointed providers.

References: [L1](https://www.leviathansystems.co/services/gpu-assembly)

## Primary sources

- [E1 — Envoy v1.35.0: Supported load balancers — Weighted least request](https://www.envoyproxy.io/docs/envoy/v1.35.0/intro/arch_overview/upstream/load_balancing/load_balancers). Checked 2026-10-22. Historical overview supports dynamic-weight arithmetic. It supplies no installed-version, maintenance-status or workload-performance finding.
- [E2 — Envoy v1.35.0: LeastRequest extension interface](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/api/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto). Checked 2026-10-22. SelectionMethod, choice_count and bias fields identify this historical interface. Availability in an offered deployment requires separate evidence.
- [E3 — Envoy v1.35.0: LeastRequest host-selection implementation](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.cc). Checked 2026-10-22. Unweighted selection loops support repeated draws and complete-vector comparison. LR64 supplies frozen counts and a unique full-scan minimum.
- [E4 — Envoy v1.35.0: LeastRequest class and bias refresh](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/least_request/least_request_lb.h). Checked 2026-10-22. Identifies the EDF-backed base and cached bias. The example supplies its effective bias without a runtime change.
- [E5 — Envoy v1.35.0: EDF load-balancer branch selection](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/extensions/load_balancing_policies/common/load_balancer_impl.cc). Checked 2026-10-22. Refresh and chooseHostOnce establish the slow-start qualification and scheduler branch. The eligible source is independently stipulated.
- [E6 — Envoy v1.35.0: EDF scheduler selection and reinsertion](https://raw.githubusercontent.com/envoyproxy/envoy/v1.35.0/source/common/upstream/edf_scheduler.h). Checked 2026-10-22. pickAndAdd, add, popEntry and queue ordering support the supplied-state transition. Initialization history is outside LR64.
- [L1 — Leviathan Systems: Rack Assembly & Preparation](https://www.leviathansystems.co/services/gpu-assembly). Checked 2026-10-22. Agreed equipment receiving, preparation, rack assembly and physical handoff, with project-specific inputs, resources and availability.

## Related Leviathan resources

- [HTTP/2 streams and inference batch membership](/articles/http2-concurrent-streams-versus-inference-batches)
- [Inference replica scaling and GPU node provisioning](/articles/gpu-inference-replica-versus-node-autoscaling)
- [Endpoint termination and requests already in flight](/articles/inference-endpoint-termination-versus-request-drain)
- [Missing worker gauges and observed zero values](/articles/inference-gauge-staleness-missing-versus-zero)
- [Resource authorization: decision and enforcement](/articles/ai-resource-authorization-network-location-policy-enforcement)
- [Model promotion and observed serving-release identity](/articles/model-registry-promotion-serving-release-rollback-state)
- [Rack Assembly & Preparation for a separate equipment requirement](/services/gpu-assembly)
- [Discuss a separate equipment preparation and physical handoff](/contact?service=gpu-assembly&from=%2Farticles%2Fenvoy-least-request-sampled-weighted-host-selection)

## Does the wider project need equipment preparation?

Share a nonconfidential equipment and configuration summary, proposed location, permitted physical tasks and required handoff to discuss receiving, preparation or rack assembly.

[Discuss the scope](/contact?service=gpu-assembly&from=/articles/envoy-least-request-sampled-weighted-host-selection)
