Skip to content

feat(runtime): make Velo the default response plane - #19283

Draft
jthomson04 wants to merge 2 commits into
mainfrom
jthomson04/velo-default-response-plane
Draft

jthomson04 wants to merge 2 commits into
mainfrom
jthomson04/velo-default-response-plane

Conversation

@jthomson04

@jthomson04 jthomson04 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

Merge after the 1.8 code freeze (Dec 1), once #17885 is merged. This PR is stacked on #17885.

Overview

Makes Velo the default response plane (#16809). The default tcp plane opens one connection back to the frontend for every request and sends each token as its own small packet. Velo multiplexes every response stream between a worker and a frontend over a few persistent connections, and batches frames from many streams into each write.

With --response-plane and DYN_RESPONSE_PLANE unset, runtimes now use Velo. DYN_RESPONSE_PLANE=tcp keeps the old plane. TLS deployments stay on tcp automatically, and 1.8 and 1.9 pods serve each other's requests during the rollout, so a 1.8 → 1.9 rolling upgrade needs no config change (both from #17885).

Key Changes

  • network.rs: ResponsePlaneMode's default moves from Tcp to Velo. Python launchers already leave an unset plane to the runtime (feat(runtime): tolerate response plane mismatches; TLS stays on tcp; Velo 0.22.1 #17885), so this one line covers them too.
  • Help text, docstrings and env docs say velo.
  • Docs:
    • The runtime reference gains --response-plane, DYN_VELO_RESPONSE_PORT and DYN_VELO_RESPONSE_TRANSPORT.
    • The TLS pages and the security guidelines note that TLS keeps responses on tcp.
    • SGLang manual drain needs --response-plane tcp; the Pool Relay page notes the Velo port.
    • A v1.9.0 Behavioral entry, with the migration.

Validation

Synthetic frontend benchmark at scale (#15231): GB200, 2,048 mock workers, two NUMA-pinned frontends, AgentX traces, concurrency 6,144, one run per arm on the same nodes.

Metric Default TCP Velo TCP
Requests/s 2,420 5,492
Frontend CPU ms/request 27.9 24.1
Host softirq (cores) 60.8 14.1
Wire packets/output token 2.22 1.25
p99 TTFT (ms) 18,895 3,111

Default TCP had 1.27% HTTP 504 errors; Velo had none.

Live GPU engines: 12 published InferenceX AgentX points, from concurrency 1 to max-throughput. They span 6 models, GB200, GB300 and VR200, and SGLang, vLLM, TRT-LLM and TileRT, with 4 same-node pairs per point.

  • Throughput, tok/s/user and ITL are equivalent at every point; every 95% CI includes zero or is within ±1%.
  • Frontend CPU per request at the highest-rate point (DSv4.1 c9888): −4.5% to −9.4%.
  • Concurrency 1 pays about 3 ms of TTFT, because a lone stream waits out the 2 ms batch window.

Local:

  • cargo test -p dynamo-runtime --lib, plus the worker_removal_cancellation, response_stream_establish_timeout and ingress_duplicates integration tests.
  • cargo test -p dynamo-llm --lib and --test namespace_scope_routing.
  • Clippy, and the docs lint.
  • CI's end-to-end jobs now run on Velo.

Known behavior:

  • Every runtime process (frontends, workers, routers, planner, Relay) opens one Velo listener at startup on DYN_TCP_RESPONSE_STREAM_HOST.
  • Frontends and workers connect to each other's Velo listeners. DYN_VELO_RESPONSE_PORT fixes the port where a network policy needs it.
  • tcp keeps its unit and integration tests, but no end-to-end job runs it.

Issues and Ongoing Work

Pull Request Checklist
  • I used Dynamo's /pr-checklist skill.

🤖 Generated with Claude Code

@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test 1127999

@github-actions github-actions Bot added feat documentation Improvements or additions to documentation frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` labels Nov 20, 2026
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test e088c3c

@jthomson04
jthomson04 force-pushed the jthomson04/velo-default-response-plane branch from 1127999 to e088c3c Compare November 20, 2026 22:05
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@jthomson04
jthomson04 force-pushed the jthomson04/velo-default-response-plane branch from e088c3c to 5badd4b Compare November 20, 2026 22:21
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test 5badd4b

@jthomson04
jthomson04 added this pull request to stack #19292 November 20, 2026 22:52
Base automatically changed from jthomson04/response-plane-tls-default to main November 20, 2026 23:37
Velo multiplexes every response stream between a worker and a frontend
over a few persistent connections and batches frames from many streams
into each write, where tcp opens one connection per request. With the
plane unset, runtimes now use Velo. A process with any DYN_TCP_TLS_*
setting still runs on tcp, because Velo has no TLS.

Docs: the response plane flags in the runtime reference, TLS notes, the
SGLang drain and Pool Relay port notes, and a v1.9.0 entry.

Closes #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
@jthomson04
jthomson04 force-pushed the jthomson04/velo-default-response-plane branch from 5badd4b to 9dd6eb8 Compare November 20, 2026 23:37
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test 4202558cc828824982676470b4166b167aa4b02e

decode_rejection_reaches_remote_prefill_context reported a cancelled
prefill only from inside the worker's response stream. On a kill, the
Velo response plane drops that stream without polling it again, so the
test timed out even though the worker's context was killed. The test
engine now watches its context from its own task, as engine handlers
do, so the check holds on both response planes.

Part of #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test ebb90b7

@github-actions github-actions Bot added the router Relates to routing, KV-aware routing, etc. label Nov 20, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

❌ Dynamo PR CI failed — run 44838486403 (attempt 1) on ebb90b7723

Gate checks: ❌ backend-status-check · ✅ deploy-status-check · ❌ dynamo-status-check

Framework Multi-GPU amd64
SGLang ❌ 1
Other Jobs
dynamo-runtime ❌ 2 ✅ 5

Failure details

3 jobs failed, all in request-cancellation tests: 6 Python-bindings cancellation tests fail the same way on amd64 and arm64, and 2 SGLang decode-cancel fault-tolerance tests never see the control_msg=Kill log line. No infrastructure signatures.

❌ sglang-runtime / 2-GPU Test cuda13.0, amd64: test_request_cancellation_sglang_decode_cancel — Kill control message not found

Job: sglang-runtime / 2-GPU Test cuda13.0, amd64 · Failed step: Run GPU tests (sequential) · Logs: gh run view --job 136645647965 -R ai-dynamo/dynamo --log-failed

tests/fault_tolerance/cancellation/utils.py:774: in poll_for_pattern
    raise AssertionError(
E   AssertionError: Failed to find 'issued control message control_msg=Kill' pattern after 1000 iterations (5000ms)
FAILED tests/fault_tolerance/cancellation/test_sglang.py::test_request_cancellation_sglang_decode_cancel[nats] - AssertionError: Failed to find 'issued control message control_msg=Kill' pattern after 1000 iterations (5000ms)
FAILED tests/fault_tolerance/cancellation/test_sglang.py::test_request_cancellation_sglang_decode_cancel[tcp] - AssertionError: Failed to find 'issued control message control_msg=Kill' pattern after 1000 iterations (5000ms)
===== 2 failed, 7 passed, 5 skipped, 7136 deselected in 947.75s (0:15:47) ======

Both nats and tcp variants of the SGLang disaggregated decode-cancel test failed after 3 auto-retries each. After the client cancels a request, the frontend log never shows issued control message control_msg=Kill within 5 s.

❌ dynamo-runtime / test / sequential cuda13.0, amd64: 6 test_cancellation.py tests — cancellation not propagated

Job: dynamo-runtime / test / sequential cuda13.0, amd64 · Failed step: Run CPU-only tests (parallelized) · Logs: gh run view --job 136646852876 -R ai-dynamo/dynamo --log-failed

FAILED lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[nats] - test_cancellation.py:318
    assert False, "Stream completed without cancellation"
E   AssertionError: Stream completed without cancellation
FAILED lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_already_cancelled[nats] - test_cancellation.py:379
    await asyncio.wait_for(_wait_for_cancelled_request(request, handler), timeout=5)
lib/bindings/python/tests/cancellation/test_cancellation.py:362: in _wait_for_cancelled_request
    async for _ in stream:
E   ValueError: Cancelled: CancelledError:

test_server_context_cancel[nats|tcp] fails because the stream finishes normally rather than being cancelled by the server. test_client_context_already_cancelled[nats|tcp] and test_client_context_cancel_before_await_request[nats|tcp] fail because iterating the stream raises ValueError: Cancelled: CancelledError:. Both transports are affected.

❌ dynamo-runtime / test / sequential cuda13.0, arm64: same 6 test_cancellation.py tests

Job: dynamo-runtime / test / sequential cuda13.0, arm64 · Failed step: Run CPU-only tests (parallelized) · Logs: gh run view --job 136646853014 -R ai-dynamo/dynamo --log-failed

FAILED lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[tcp] - test_cancellation.py:318
E   AssertionError: Stream completed without cancellation
FAILED lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_cancel_before_await_request[tcp] - test_cancellation.py:397
lib/bindings/python/tests/cancellation/test_cancellation.py:362: in _wait_for_cancelled_request
    async for _ in stream:
E   ValueError: Cancelled: CancelledError:

The failures and errors are the same as on amd64.

For agents
{"pr": 19283, "run_id": 44838486403, "run_attempt": 1, "head_sha": "ebb90b7723911826d3835267dc0fc563771103e0",
 "failures": [
  {"job": "sglang-runtime / 2-GPU Test cuda13.0, amd64", "job_id": 136645647965, "failed_step": "Run GPU tests (sequential)", "signature": "AssertionError: Failed to find 'issued control message control_msg=Kill' pattern", "tests": ["tests/fault_tolerance/cancellation/test_sglang.py::test_request_cancellation_sglang_decode_cancel[nats]", "tests/fault_tolerance/cancellation/test_sglang.py::test_request_cancellation_sglang_decode_cancel[tcp]"], "log_cmd": "gh run view --job 136645647965 -R ai-dynamo/dynamo --log-failed"},
  {"job": "dynamo-runtime / test / sequential cuda13.0, amd64", "job_id": 136646852876, "failed_step": "Run CPU-only tests (parallelized)", "signature": "Stream completed without cancellation / ValueError: Cancelled: CancelledError", "tests": ["lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[tcp]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_already_cancelled[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_already_cancelled[tcp]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_cancel_before_await_request[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_cancel_before_await_request[tcp]"], "log_cmd": "gh run view --job 136646852876 -R ai-dynamo/dynamo --log-failed"},
  {"job": "dynamo-runtime / test / sequential cuda13.0, arm64", "job_id": 136646853014, "failed_step": "Run CPU-only tests (parallelized)", "signature": "Stream completed without cancellation / ValueError: Cancelled: CancelledError", "tests": ["lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_server_context_cancel[tcp]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_already_cancelled[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_already_cancelled[tcp]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_cancel_before_await_request[nats]", "lib/bindings/python/tests/cancellation/test_cancellation.py::test_client_context_cancel_before_await_request[tcp]"], "log_cmd": "gh run view --job 136646853014 -R ai-dynamo/dynamo --log-failed"}
 ]}

Posted automatically by Devin for run 44838486403. Updated on every full-CI run of this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` router Relates to routing, KV-aware routing, etc. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant