ai_dynamo.sh: launch workers before the ingress readiness wait#972
Merged
Conversation
On a combined frontend+worker node (single-node aggregate), launch_ingress blocks in wait_for_router for the full ROUTER_START_TIMEOUT (120 s of failing readiness curls) before the decode/prefill blocks are reached — but the router cannot become ready until a worker registers, so the wait always burns its entire budget and every run pays a guaranteed 2-minute startup tax plus a misleading 'Router did not become ready' ERROR. Workers only need etcd/nats (already waited on) and the lmcache config from setup_lmcache; they register via etcd and never talk to the router. Launch them first, then bring up the ingress: its readiness wait now overlaps worker/engine initialization instead of serializing in front of it. Multi-node behavior is unchanged (worker-only nodes skip the frontend blocks; ordering across nodes was already concurrent). Phase restarts via routerctl.sh are untouched. Signed-off-by: Ilya Yanok <iyanok@nvidia.com>
yanok
requested review from
jeffnvidia,
podkidyshev and
srivatsankrishnan
as code owners
July 20, 2026 15:31
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesFrontend startup ordering
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
podkidyshev
approved these changes
Jul 21, 2026
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.
Summary
On a combined frontend+worker node (e.g. a single-node aggregate
deployment),
main()callslaunch_ingressbefore the decode/prefillblocks are reached.
launch_ingressblocks inwait_for_router— but therouter cannot become ready until a worker registers, and no worker has been
launched yet. The wait therefore always burns its entire
ROUTER_START_TIMEOUTbudget (120 s of failing readiness curls), everycombined-node run pays a guaranteed 2-minute startup tax, and the log ends
up with a misleading
Router did not become readyERROR for a router thatis actually fine.
This PR reorders
main(): workers launch first, then the ingress. Workersonly need etcd/nats (already waited on above) and the lmcache config from
setup_lmcache; they register via etcd and never talk to the router — sonothing about worker startup depends on the ingress. With the new order,
the router readiness wait overlaps worker/engine initialization instead of
serializing in front of it, and it completes as soon as a worker registers
rather than timing out.
Behavior is unchanged where the old order was already correct:
ordering across nodes was already concurrent.
launch_sgl_http_servermoves together withlaunch_ingress, keeping their relative order.routerctl.share untouched.Test Plan
in single-node aggregate mode (combined frontend+worker), vLLM workers
with LMCache.
harness since 2026-07-14, across dozens of single-node combined runs
(multi-hour benchmark sweeps): startup no longer serializes the 120 s
router wait in front of worker launch, the
Router did not become readyERROR is gone, and the router readiness completes once the first worker
registers.
gated on
_is_frontend_node, which worker-only nodes never enter, so thediff is a no-op for them.
Additional Notes
The root cause is a circular wait, not a slow router:
wait_for_routercannot succeed before a worker exists, so any ordering that puts it ahead
of worker launch on the same node converts the timeout into a fixed startup
cost. If a future change makes the router ready without workers, the new
order still holds (the wait just returns early).