Repository navigation
fix(sglang): relay multinode DP sidecar KV events - #473
Merged
alec-flowers merged 9 commits intoOct 7, 2026
Merged
Conversation
Signed-off-by: jain-ria <riajain@NVIDIA.com>
jain-ria
requested review from
alec-flowers,
csahithi,
hjjq,
ishandhanani,
kedarpotdar-nv,
kyleliang-nv,
nlevin-ui and
qiching
as code owners
September 17, 2026 16:30
Signed-off-by: jain-ria <riajain@NVIDIA.com>
Signed-off-by: jain-ria <riajain@NVIDIA.com>
Preserve SGLang KV publisher port ranges inside the per-engine allocation loop added for vLLM shadow engines. Keep both allocator options and their existing defaults. Signed-off-by: jain-ria <riajain@NVIDIA.com>
Let native SGLang allocate per-replica NCCL ports for sidecar regular DP instead of reusing a fixed port across independent TP groups. Preserve fixed ports for TP and attention DP, and cover aggregate, prefill, and decode launch commands. Signed-off-by: jain-ria <riajain@NVIDIA.com>
Signed-off-by: jain-ria <riajain@NVIDIA.com>
Move the PR's SGLang multinode sidecar documentation into the new native sidecars guide and fix its example links for the published docs. Signed-off-by: jain-ria <riajain@NVIDIA.com>
|
|
alec-flowers
reviewed
Oct 7, 2026
alec-flowers
reviewed
Oct 7, 2026
Signed-off-by: jain-ria <riajain@NVIDIA.com>
alec-flowers
approved these changes
Oct 7, 2026
trevor-m
added a commit
to trevor-m/srt-slurm
that referenced
this pull request
Oct 13, 2026
SGLang binds each KV-event publisher at the configured port plus its DP rank (the attention-DP rank, or the replica rank without attention DP). Two DP workers on one node got consecutive base ports, so worker 0's rank 1 bound worker 1's base and failed with "Address already in use". NVIDIA#473 reserved a dp-size block, but only in Dynamo sidecar mode with KV events, and it read only dp-size. Reserve the block for every SGLang process, as the vLLM backend does for its local DP ranks, and size it with SGLangBackend.num_dp_ranks (dp-size x attn-dp-size). sgl-project/sglang#41818 added --attn-dp-size and left dp-size counting replicas; the deprecated dp-size + enable-dp-attention spelling resolves to the same layout. The sidecar follower-publisher check, the replica NCCL-port rule and the AIPerf follower scrape now read the same resolver, so --attn-dp-size works there too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
weireweire
pushed a commit
that referenced
this pull request
Oct 16, 2026
SGLang binds each KV-event publisher at the configured port plus its DP rank (the attention-DP rank, or the replica rank without attention DP). Two DP workers on one node got consecutive base ports, so worker 0's rank 1 bound worker 1's base and failed with "Address already in use". #473 reserved a dp-size block, but only in Dynamo sidecar mode with KV events, and it read only dp-size. Reserve the block for every SGLang process, as the vLLM backend does for its local DP ranks, and size it with SGLangBackend.num_dp_ranks (dp-size x attn-dp-size). sgl-project/sglang#41818 added --attn-dp-size and left dp-size counting replicas; the deprecated dp-size + enable-dp-attention spelling resolves to the same layout. The sidecar follower-publisher check, the replica NCCL-port rule and the AIPerf follower scrape now read the same resolver, so --attn-dp-size works there too. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Multinode SGLang attention-DP deployments previously launched a Dynamo sidecar only on the leader, leaving follower KV events unavailable to the router. Launch native gRPC and a coupled sidecar on each follower that owns a KV publisher, while retaining one serving registration per logical worker. Dynamo selects serving or telemetry mode from engine metadata; srtctl no longer passes
--telemetry-only. Followers without publishers remain engine-only.Reserve the full global-DP publisher-port range to prevent collisions between colocated workers, keep prefill bootstrap addresses leader-only, and omit an explicit NCCL port for ordinary-DP sidecar engines so SGLang can allocate separate ports for its independent TP groups. Includes agg/disagg examples, docs, launch snapshots and regression coverage. No frontend-readiness changes.
Requires compatible Dynamo PR14908 and SGLang PR39659, including their native libraries. Python-only source overlays are insufficient.
Validation after merging main
Merge commit
c285a29incorporates upstream main848f72d. Ruff, formatting, type checks and generated schema checks pass; focused sidecar/port/design checks: 95 passed. Full suite: 4,146 passed, 2 skipped, 6 deselected, 3 failed. Two failures pass isolated reruns (console wrapping and status-server timeout); the remaining MLPerf snapshot mount-order difference also fails on untouched upstream main under a non-default temporary directory. No patch-specific CPU test failure remains.Fresh GPU runs use actual
srtctl apply, Qwen/Qwen3-0.6B BF16, A16 GPUs, Dynamo4da4ccbe938dand SGLang047eb45dfb3b, with native libraries freshly rebuilt and hashes verified. Runtime dependencies were aligned to Torch 2.14.1+cu130, Transformers 5.17.0 and FlashInfer 0.7.0.post1, including matching cubins/JIT cache. SA-Bench: ISL 128, OSL 64, concurrency 4; custom post-evaluation checks cover rank routing, cache reuse, KV events and disaggregated transfers.KV source rank 1 is outside dp_size 1. Current SGLang reportsdp_size=1, attn_dp_size=2; Dynamo still validates/registers against dp_size.KV source rank 1 is outside dp_size 1, withattn_dp_size=2.Validation is not fully green with the current dependency heads. SGLang needs to use the system-DP rank for ordinary-DP bootstrap registration/checks; Dynamo needs to interpret SGLang's separate system-DP and attention-DP widths consistently during metadata validation and worker registration. These failures remain in the dependency PRs; no SRT readiness gate or workaround was added.
Native dev builds use
RUST_MIN_STACK=33554432(32 MiB). This is functional smoke validation, not release-performance or default-stack qualification. No dependency source patches were applied for these fresh runs.Earlier attention-DP agg/disagg runs passed 40/40 benchmark and 27/27 or 31/31 targeted requests using Dynamo
9ab50011f8bf, SGLang8eaffcf88dacand srt-slurm978b35b. Those results do not establish compatibility of the current dependency heads.