feat(router): opt-in parent session affinity for initial placement - #11347
feat(router): opt-in parent session affinity for initial placement#11347YAMY1234 wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
ff45a4b to
a33e574
Compare
a33e574 to
964d531
Compare
When DYN_ROUTER_PARENT_AFFINITY=1 and a request carries an agent-context parent_session_id, an unbound session's first request is placed on the worker bound to its parent session, so subagents co-locate with the prefix they share. The session still binds its own id on route (via the existing AffinityAcquire), so the hint only influences initial placement. The parent lookup is a non-binding peek (AffinityCoordinator::query_target) reusing the coordinator's eligibility/expiry checks; if placement on the parent worker fails, the request falls back to normal KV routing. Default off; wire-compatible. Reworked onto the header-based session_affinity architecture (the previous sticky/coordinator implementation this PR originally targeted was removed upstream). Implements ai-dynamo#11343. Signed-off-by: Yangmin Li <yangminl@nvidia.com>
The per-system support-matrix CSV files were relocated in the aiconfigurator repo from src/aiconfigurator/systems/support_matrix to aic-core/src/aiconfigurator_core/systems/support_matrix, so the old link 404s and fails the repo-wide lychee link check. Point it at the current path. Signed-off-by: Yangmin Li <yangminl@nvidia.com>
964d531 to
4bea22b
Compare
Unsigned Commits DetectedThe following commits are not GPG-signed and must be signed before CI can run:
Please sign your commits and push again. See the GitHub docs on commit signature verification for help. |
|
Hi @YAMY1234, thanks for working on this. I see that commit I have completed additional end-to-end validation for #11343:
I also opened the benchmark-only contribution request #14045 so this behavior can be tested independently of the runtime implementation. Are you planning to resume and finish #11347? If so, I would be happy to help with benchmark validation, tests, rebasing, or other follow-up work. If not, would you be comfortable with me coordinating with the maintainers on a current-main successor PR, while preserving attribution to your implementation? I will wait for your and the maintainers' direction before starting a separate runtime implementation. |
What
CLOSES: DYN-3521 DGH-1094
Opt-in parent session affinity for initial placement (proof-of-concept for #11343): when
DYN_ROUTER_PARENT_AFFINITY=1and a request'snvext.session_controlcarriesparent_session_id, an unbound session's first request is placed on the worker (and DP rank) currently bound to its parent session. The session then binds its own id on route, so the hint only influences initial placement; parent lookup reuses the existing sticky machinery, including the ineligible-worker fallback. Default off; the new field is optional and wire-compatible.Why
Agentic workloads spawn subagent sessions that share a large prefix with their parent. On deployments without KV-event prefix indexing, a child session's first request is placed blindly and re-prefills the shared prefix once per child. Details and design discussion in #11343.
Status / scope
session_controlprotocol (base3169427d) — this is the protocol window we could validate end-to-end with an agentic trace-replay client emittingparent_session_id.main— the sticky coordinator was reworked by feat(router): coordinate session affinity across replicas [DYN-3249] #11079 (session claims); on main the parent id is already parsed from the agentic identity headers, so the policy should consume that instead of a new body field.Happy to do the main port if the direction looks right — opening early for feedback on the policy shape.