Repository navigation
Conversation
…r core Pools become the router core's workers. With --use-selection-core every pick is an advisory select on the core, which books nothing, and the core runs the policy's WorkerPicker plugin, picking as RoundRobinSelector and LeastInFlightSelector do. A least-in-flight pick counts as pending on its pool until the request takes it over as its in-flight count, so concurrent picks see each other; a failed or abandoned select gives the pick back. PoolSelector becomes the one selection trait: async, returning a Selection that may hold state for the request. Adds FrontendSignals and fixes the redirect path. Affinity is rejected on the core path until the next PR. Least-in-flight now places requests by affinity's rule, on both paths: nearest region first, then requests in flight over the pool's capacity (from its Relay), then fewer in flight, ties rotating; it leaves the nearest pool only for one with more than --headroom-factor times its spare room. The rule lives once, in placement.rs, shared by affinity and both least-in-flight pickers. --region is now required for least-in-flight, and --pool-relay is read by it. This intentionally differs from main's least-in-flight, which had no notion of region. Part of #17638 Signed-off-by: nnshah1 <neelays@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds HeadroomPicker, AffinityConfig, the soft session table and bounded PinRefresh. Affinity books locally only to set, move or refresh a pin, and now runs on the core path. Part of #17638 Signed-off-by: nnshah1 <neelays@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds proto/replica_sync.proto (package dynamo.globalrouter.replica.v1) behind the grpc feature, its build.rs and CONTRACT_MARKER, and the wire conversions for affinity bindings in dynamo-global-router. The stream carries session bindings and per-pool InflightCount only. Part of #17639 Signed-off-by: nnshah1 <neelays@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the gRPC hub, server and dialer, --replica-sync and --peer, peer discovery through Global Discovery, InflightCount publishing, binding replication and the replica-sync metrics, and documents them in the README's "Replica sync" section. Bookings are never replicated. Part of #17639 Signed-off-by: nnshah1 <neelays@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
✅ Dynamo PR CI passed — run 41711101971 (attempt 1) on
|
`SchedulerQueue::select_without_admission` sent each advisory selection to the per-model admission actor and waited for the answer. The selection only reads state the actor shares, so it now runs on the caller's task: - `SelectionView` holds what one selection reads; the actor and the inline path both build one, so both run the same selection code. - `project_worker_loads` and `advisory_response` are shared helpers. - The selector moves behind `Arc<parking_lot::Mutex<_>>`, shared by the actor and the queue. The lock keeps picks and runtime policy updates serialized, as on the actor, so no trait bound changes (pickers stay `Send`, not `Sync`). - The actor path stays as a test-only reference. Global Router: the abandoned-select test now accepts a select that answers on its first poll, and a new test runs least-in-flight picks on parallel threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
nnshah1
force-pushed
the
nnshah1/gr-core-k1-advisory-inline
branch
from
November 3, 2026 20:16
040df3d to
3f1a6e1
Compare
nnshah1
force-pushed
the
nnshah1/gr-core-c2b-transport
branch
4 times, most recently
from
November 4, 2026 16:41
49b912d to
4861c1d
Compare
This branch has not been deployed
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.
Overview
An advisory selection (
SchedulerQueue::select_without_admission) no longer goes through the per-model admission actor. It runs on the caller's task, with the same selection code and the same state.Stack (DEP #17638): #17597 → #17598 → #17665 → #17669 → this PR. This is the only PR in the stack that changes
lib/kv-router.Why: the fleet benchmark of the Global Frontend's core path (
inbox/global-view-relay/gf-max-2026-11-03) showed that the remaining cost is the hop through the admission actor. Round-robin cost about 15 µs more per request than the current path. At saturation, selection took milliseconds, because each advisory pick waited behind the actor's other commands. Any advisory caller gets this fix, including the local router.Key Changes
SelectionViewholds what one selection reads: worker configurations, the selector, the availability and overload providers, the selection trace and observer, the block size and the full-rank counts. The actor and the inline path both build one, so there is one copy of the selection logic.project_worker_loads(load projection and reject thresholds) andadvisory_response.Arc<parking_lot::Mutex<_>>, shared by the actor and the queue. The lock keeps picks and runtime policy updates serialized, as on the actor. No trait bound changes: pickers staySendand do not needSync.select_without_admissionyields once (tokio::task::yield_now) before the inline pick, as the round trip to the actor did. Without it the caller's task runs on without a break, and the runtime loses the chance to batch other connections' I/O. Nothing is picked before the yield, so a caller dropped there leaves nothing behind.select_without_admission_on_actor.Validation
cargo test --release -p dynamo-kv-router -p dynamo-global-router -p dynamo-global-frontend -p dynamo-global-common: all pass (kv-router 1427, global-router 79, global-frontend 12 + 9 + 16, discovery peers 2, global-common 10).cargo fmt,cargo clippy --all-targets -D warnings: clean.cargo check -p dynamo-llm: builds.advisory_selection_cost,#[ignore]; 4 workers, 4 runtime threads, 20,000 selections):Issues and Ongoing Work
Syncpickers.Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code