Repository navigation
Conversation
…n by a pod watch The direct frontend's engine list was fixed at startup: register_direct_model installed a constant list. The runtime's static instance source already diffs a changing list, so make the rest follow it. - llm: EngineConfig::Direct carries a watch of DirectWorkers. The decode and prefill instance lists, the runtime-config watch (selection catalog and ZMQ KV subscriptions), and the prefill admitted ids are projections of it that publish only on change and hold the last value if the owner goes away. - sidecar-common: DirectFleet::into_membership returns a DirectMembership that probes, checks, registers, and publishes added engines, and withdraws removed ones. direct::pods watches pods by label selector and keeps a membership in step with the Ready pods, retrying each engine independently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
nnshah1
had a problem deploying
to
external_collaborator
November 9, 2026 23:51 — with
GitHub Actions
Failure
nnshah1
had a problem deploying
to
external_collaborator
November 9, 2026 23:51 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Stacked on #102. Adds the Kubernetes pod feeder from #33 (phase 4) for direct mode: engines can join and leave a serving direct frontend, and a label-selector pod watch drives that.
Summary
Today
register_direct_modelinstalls a constant list throughkeep_alive, so the engine set is fixed at startup. The runtime half already handles a changing list:register_static_endpoint_instancestakes awatch<Vec<Instance>>, and the static discovery source diffs each update intoAdded/Removed. This PR makes the rest follow.lib/llmEngineConfig::Direct.workersis awatch::Receiver<Vec<DirectWorker>>.register_direct_modelderives three views of the list:directDirectFleet::into_membership(model)returns the config plus aDirectMembership<B>.into_engine_configis unchanged for callers.DirectMembership::add(url, role)probes the engine and checks it serves the fleet's model. It applies the operator role hint for backends that can't report roles, and rejects a prefill engine on an aggregated frontend. It registers the engine with the backend before publishing it, so the router never selects an unregistered instance.remove(url)withdraws the engine. The dispatch state is dropped through the existingStreamingDispatch::on_instance_removed.direct::podshttp://<pod IP>:<port>. The port comes from the pod'snvidia.com/dynamo-engine-grpc-portannotation, or else the selector's pool-wide port.probe_first_podswaits for the first serving pod of each selector, which seeds the model card.PodEngines::adoptinghands those pods to the watcher, which withdraws them at the first relist if they are gone.--prefill-engine-url.Not in this PR: the CLI wiring for pod selectors in
make_engine, which belongs on #99, plus RBAC and manifests.Validation
cargo test -p dynamo-sidecar-common --lib: 37/37. New tests:pod_urlrules;cargo test -p dynamo-llm --lib entrypoint::input::direct: 2/2. Covers per-role projection and holding the last list when the owner goes away.direct_mocker_integration.rsplus two local tests that are not in this PR: 5/5.add(B), after which B serves;remove(A), after which A receives none of the next 4 requests.cargo fmt,cargo clippy -D warningson both crates.Known edges
on_instance_removedruns asynchronously after the runtime broadcastsRemoved. Ifaddre-registers the same id before that callback runs, the callback drops the fresh registration. A pod's readiness round trip takes seconds, so this is unlikely, but a generation check in the backend'stargetsmap would close it.EngineConfig::Direct { workers, .. }and only passesworkerstoregister_direct_modelcompiles unchanged.🤖 Generated with Claude Code