Repository navigation
feat(router): add header-based session affinity [DYN-3249] - #10875
Conversation
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
WalkthroughThis PR implements session affinity routing for Dynamo: HTTP request headers ( ChangesSession Affinity Routing
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches⚔️ Resolve merge conflicts
Comment |
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Summary
X-Dynamo-Session-IDwith native Claude Code, Codex, and OpenCode header fallbacks while keeping trajectory identity independent.--router-session-affinity-ttl-secsconfiguration and document migration from the removed body-level session-control API.This PR sends no backend lifecycle RPCs and does not couple session affinity to trajectory identity or SGLang radix tagging. It supersedes #10854, which implemented the previous explicit lifecycle-based design.
Validation
cargo fmt --all --checkcargo clippy -p dynamo-llm --no-default-features -- -D warningscargo clippy --manifest-path lib/bindings/python/Cargo.toml --no-default-features -- -D warningscargo test -p dynamo-llm --lib --no-default-features session_affinitycargo test -p dynamo-llm --lib --no-default-features kv_router::push_routercargo test -p dynamo-llm --lib --no-default-features kv_router::prefill_router.venv/bin/python -m pytest components/src/dynamo/common/tests/configuration/test_kv_router_args.py -qcargo metadata --locked --no-deps --format-version 1in the root workspace and Python binding workspacefern checkfern docs broken-linksgit diff --checkSummary by CodeRabbit
New Features
--router-session-affinity-ttl-secs(default: 300 seconds) for routing session-specific requests to bound workers.Documentation
X-Dynamo-Session-ID) and trajectory identity headers (X-Dynamo-Trajectory-ID) as independent mechanisms for routing and request tracing.