Skip to content

feat(runtime): tolerate response plane mismatches; TLS stays on tcp; Velo 0.22.1 - #17885

Merged
jthomson04 merged 7 commits into
mainfrom
jthomson04/response-plane-tls-default
Nov 20, 2026
Merged

jthomson04 merged 7 commits into
mainfrom
jthomson04/response-plane-tls-default

Conversation

@jthomson04

@jthomson04 jthomson04 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Prepares for making Velo the default response plane in 1.9 (#16809). The default stays tcp; this PR changes what happens when frontend and worker disagree, and when Velo meets TLS. It lands in 1.8 so a 1.8 → 1.9 rolling upgrade works with no config change.

  • A plane mismatch no longer fails requests. A worker failed any request whose response plane differed from its own, and the frontend then quarantined it. So a rolling update that changes the plane, such as 1.8 → 1.9 under a Velo default, would fail every request between old and new pods. The worker already builds the publisher for the plane the frontend advertises, so it now serves the request and logs one warning per process. The contract is unchanged: frontends and workers use the same plane.
  • Velo under TLS runs on tcp. Velo has no TLS. A runtime that selected Velo refused to start while any DYN_TCP_TLS_* setting was present; it now runs on tcp and logs one warning. The operator injects those settings into every DGD container when platform TLS is on, so TLS deployments keep working under a Velo default.
  • Python leaves the plane to the runtime. --response-plane, WorkerConfig, create_runtime (Triton included) and the TRT-LLM snapshot path default to None instead of "tcp", so the Rust default applies. A later flip is then one line.
  • Velo 0.22.1. Random stream anchor ids (fix(streaming): pick anchor ids at random velo#159, the DEP's authentication item), plus rendezvous, peer-registration and UCX teardown fixes. The opt-in on_complete and at_bytes flush conditions stay off, so batching is unchanged.

Key Changes

  • push_handler.rs: the mismatch check becomes a one-time warning; generate_and_publish takes the plane in use for its error messages.
  • network.rs, distributed.rs: ResponsePlaneMode::tcp_under_tls() turns a Velo selection into tcp while TLS is configured, for DYN_RESPONSE_PLANE and for an explicit DistributedConfig.response_plane.
  • velo_response.rs: the startup refusal stays for one case, a worker with TLS settings that a frontend asks for Velo. Two calls move off APIs that 0.22.1 deprecates.
  • SGLang: manual drain compared dynamo_args.response_plane with "tcp", which the None default would break. DistributedRuntime.response_plane now exposes the plane the runtime resolved, and the worker records it.
  • Python launchers and docstrings; two v1.8.0 entries in deprecations.mdx.

Validation

Case Before After
Plane unset, no TLS tcp tcp
velo, no TLS velo velo
velo (flag, env or explicit config), TLS set Startup fails tcp, one warning
tcp worker, Velo frontend Request fails, worker quarantined Served over Velo, one warning
Velo worker, tcp frontend Request fails, worker quarantined Served over tcp, one warning
Worker on tcp with TLS, frontend asks for Velo Request fails Request fails
SGLang manual drain, plane unset Works (tcp) Works (tcp)
Triton with DYN_RESPONSE_PLANE=velo tcp (create_runtime pinned "tcp") velo
  • velo_worker_answers_a_tcp_frontend sends a tcp request to a Velo-configured ingress and checks the chunk arrives over tcp. It fails on main with the mismatch error.
  • velo_gives_way_to_tcp_while_tls_is_set and distributed_runtime_uses_tcp_for_velo_under_tls cover the TLS fallback.
  • Local: cargo test -p dynamo-runtime --lib, the worker_removal_cancellation, response_stream_establish_timeout and ingress_duplicates integration tests, clippy for dynamo-runtime (with and without velo-ucx) and the Python bindings, and 195 Python config, worker, SGLang drain and TRT-LLM snapshot tests.

Known limits: a worker serving Velo without Velo configured doesn't add the Velo metrics to its registry. A tcp worker with SGLang drain enabled that a Velo frontend reaches counts a request done when its publisher returns; Velo still delivers the last batch during shutdown.

Issues and Ongoing Work

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

🤖 Generated with Claude Code

@github-actions github-actions Bot added feat backend::trtllm Relates to the trtllm backend frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` labels Nov 3, 2026
@devin-ai-integration

devin-ai-integration Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ Dynamo PR CI passed — run 43342865660 (attempt 1) on c1297adb08

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

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

@jthomson04
jthomson04 force-pushed the jthomson04/response-plane-tls-default branch from 7e1fc9f to c1297ad Compare November 13, 2026 01:10
@jthomson04 jthomson04 changed the title feat(runtime): keep TLS deployments on tcp when the response plane is unset feat(runtime): use tcp when Velo is selected with TLS; move to Velo 0.22.0 Nov 13, 2026
@jthomson04
jthomson04 force-pushed the jthomson04/response-plane-tls-default branch from c1297ad to 31f3666 Compare November 20, 2026 21:42
@jthomson04 jthomson04 changed the title feat(runtime): use tcp when Velo is selected with TLS; move to Velo 0.22.0 feat(runtime): workers answer on the frontend's response plane; TLS stays on tcp; Velo 0.22.1 Nov 20, 2026
@jthomson04
jthomson04 marked this pull request as ready for review November 20, 2026 21:42
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test 31f3666

@jthomson04
jthomson04 requested review from a team as code owners November 20, 2026 21:42
@github-actions github-actions Bot added documentation Improvements or additions to documentation backend::sglang Relates to the sglang backend labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Python configuration now leaves the response plane unset by default. The Rust runtime resolves the effective plane, falls back from Velo to TCP when TCP TLS settings are present, and directs worker responses over the frontend-advertised plane. The Python binding exposes the effective response plane.

Changes

Response Plane Selection and Delivery

Layer / File(s) Summary
Optional response-plane configuration
components/src/dynamo/common/backend/*, components/src/dynamo/common/configuration/groups/runtime_args.py, components/src/dynamo/common/tests/configuration/*, components/src/dynamo/common/utils/runtime.py, components/src/dynamo/frontend/frontend_args.py, components/src/dynamo/mocker/args.py, components/src/dynamo/mocker/tests/unit/*, components/src/dynamo/trtllm/snapshot.py
Python response-plane settings now default to None. The runtime receives unset values without assigning DYN_RESPONSE_PLANE; explicit values remain validated. Tests check the unset default and supported values.
Runtime selection and TLS fallback
Cargo.toml, lib/runtime/src/config/environment_names.rs, lib/runtime/src/distributed.rs, lib/runtime/src/pipeline/network.rs, lib/runtime/src/pipeline/network/velo_response.rs, lib/bindings/python/rust/lib.rs, lib/bindings/python/src/dynamo/_core.pyi, components/src/dynamo/sglang/main.py
The runtime applies a TCP fallback when Velo is selected with TCP TLS settings. The Python binding exposes the effective response plane. Velo-related code and tests cover TLS settings, response-anchor creation, and shutdown behavior.
Frontend-selected worker responses
lib/backend-common/src/worker.rs, lib/runtime/src/pipeline/network/ingress/push_handler.rs, docs/fern/pages/reference/general/releases/deprecations.mdx
Workers use the frontend-advertised response plane, even when it differs from their configured plane. The handler logs a mismatch warning, and a test checks delivery over a frontend TCP connection. The release notes describe the mismatch and TLS fallback behavior.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 31f36

This change lets workers answer on the response plane their frontend advertises, and it keeps tcp in use when Velo is selected while TCP TLS settings are present. The default remains tcp, so existing deployments should behave as before. No concrete defect was found in review. Before merging, add a qualifying issue link so the PR Issue Link check passes.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the main change: workers tolerate response plane mismatches, Velo under TLS falls back to tcp, and Velo is bumped to 0.22.1. The changeset matches all three parts. The title is long (8…
Description check Passed The description follows the template sections: Overview, Key Changes, Validation, and Issues and Ongoing Work. It also keeps the checklist. It explains the mismatch tolerance, the TLS fallback, the Py…
Full details: Title check

Explanation

The title names the main change: workers tolerate response plane mismatches, Velo under TLS falls back to tcp, and Velo is bumped to 0.22.1. The changeset matches all three parts. The title is long (80 characters) and uses semicolons to join three changes, but it is specific and not misleading.

Full details: Description check

Explanation

The description follows the template sections: Overview, Key Changes, Validation, and Issues and Ongoing Work. It also keeps the checklist. It explains the mismatch tolerance, the TLS fallback, the Python default changes, and the Velo bump. It gives a validation table and lists tests run locally. The closing 'Closes #XXXX' line from the template is replaced by 'Part of #16809', and the checklist item is unchecked. These are minor gaps. The template marks the issue link as advisory until release/1.7.0 is cut.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 51480fc and 31f3666.

Files ignored due to path filters: 3

  • Cargo.lock is excluded by !**/*.lock
  • lib/bindings/python/Cargo.lock is excluded by !**/*.lock
  • lib/runtime/examples/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 23

  • Cargo.toml
  • components/src/dynamo/common/backend/sample_diffusion_engine.py
  • components/src/dynamo/common/backend/sample_engine.py
  • components/src/dynamo/common/backend/worker.py
  • components/src/dynamo/common/configuration/groups/runtime_args.py
  • components/src/dynamo/common/tests/configuration/test_kv_router_args.py
  • components/src/dynamo/common/tests/configuration/test_runtime_args.py
  • components/src/dynamo/common/utils/runtime.py
  • components/src/dynamo/frontend/frontend_args.py
  • components/src/dynamo/mocker/args.py
  • components/src/dynamo/mocker/tests/unit/test_config.py
  • components/src/dynamo/mocker/tests/unit/test_mocker_parser_builder.py
  • components/src/dynamo/sglang/main.py
  • components/src/dynamo/trtllm/snapshot.py
  • docs/fern/pages/reference/general/releases/deprecations.mdx
  • lib/backend-common/src/worker.rs
  • lib/bindings/python/rust/lib.rs
  • lib/bindings/python/src/dynamo/_core.pyi
  • lib/runtime/src/config/environment_names.rs
  • lib/runtime/src/distributed.rs
  • lib/runtime/src/pipeline/network.rs
  • lib/runtime/src/pipeline/network/ingress/push_handler.rs
  • lib/runtime/src/pipeline/network/velo_response.rs

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

jthomson04 and others added 4 commits November 20, 2026 14:18
… unset

Velo has no TLS, so a Velo runtime refuses to start while DYN_TCP_TLS_* is
set. Once Velo becomes the default response plane, every TLS deployment
that never set DYN_RESPONSE_PLANE would fail at startup.

Resolve the default in one place in Rust: an explicit value wins; when it
is unset, a Velo default gives way to tcp while any DYN_TCP_TLS_* setting is
present. The default stays tcp in this change, so behaviour is unchanged
until the default flips.

Python launchers pinned "tcp" explicitly and wrote it back to the
environment, so Rust never saw an unset value. They now default to None
and leave the choice to Rust. Triton, which relied on the create_runtime
default, now honours DYN_RESPONSE_PLANE.

Part of #16809.

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

The test's delenv recorded nothing when the variable was unset, so the
"velo" that validate() exported survived teardown. Later tests in the
same process then started Velo, and the cancellation tests failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
Velo has no TLS. A runtime that selected Velo refused to start while any
DYN_TCP_TLS_* setting was present, and the earlier commit only fell back to
tcp when the plane was unset and the default was Velo.

Fall back in every case instead: a Velo selection, from DYN_RESPONSE_PLANE,
a flag or an explicit DistributedConfig, runs on tcp while TLS is
configured, with one warning naming the settings. The refusal stays in the
Velo service for a worker with TLS settings that a frontend asks for Velo.

Part of #16809.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
Velo 0.22 picks stream anchor ids at random (ai-dynamo/velo#159), so a
peer can no longer attach to another request's response stream by guessing
its handle. 0.22.1 adds fixes for rendezvous slot freeing, peer
registration and UCX teardown.

0.22 adds two opt-in AutoFlush conditions, on_complete and at_bytes. Both
stay off, so response batching is unchanged.

0.22.1 deprecates AnchorManager access and Velo::graceful_shutdown; the
anchor is now created through Velo, and the test calls Velo::shutdown.

Part of #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
jthomson04 and others added 3 commits November 20, 2026 14:18
A worker failed any request whose response plane differed from its own,
and the frontend quarantined it for that. With different defaults on each
side, as in a rolling upgrade to a Velo default, every request between an
old and a new pod would fail.

The worker already builds the publisher for the plane the frontend
advertises, so it now answers on that plane and logs one warning per
process instead of failing the request.

Part of #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
With --response-plane unset, dynamo_args.response_plane is None, so the
drain checks that compare it with "tcp" would turn manual drain off.
DistributedRuntime now exposes the plane it resolved (default and TLS
fallback applied), and the SGLang worker records it after creating the
runtime.

Part of #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
Part of #16809.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
@jthomson04
jthomson04 force-pushed the jthomson04/response-plane-tls-default branch from 31f3666 to c620218 Compare November 20, 2026 22:20
@jthomson04 jthomson04 changed the title feat(runtime): workers answer on the frontend's response plane; TLS stays on tcp; Velo 0.22.1 feat(runtime): tolerate response plane mismatches; TLS stays on tcp; Velo 0.22.1 Nov 20, 2026
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test c620218

@jthomson04
jthomson04 added this pull request to stack #19292 November 20, 2026 22:52
@jthomson04
jthomson04 merged commit 448c0b6 into main Nov 20, 2026
148 of 152 checks passed
@jthomson04
jthomson04 deleted the jthomson04/response-plane-tls-default branch November 20, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend::sglang Relates to the sglang backend backend::trtllm Relates to the trtllm backend documentation Improvements or additions to documentation feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants