Repository navigation
feat(kv-router): one worker-membership path (WorkerCatalogSource) for frontend and EPP - #38
Closed
ishandhanani wants to merge 4 commits into
Closed
ishandhanani wants to merge 4 commits into
ishandhanani wants to merge 4 commits into
Conversation
Phase 4 of the runtime-optional frontend roadmap: the EPP pod reflector is the Kubernetes catalog feeder, and it registered every pod as a single data-parallel rank (the hardcoded data_parallel_size: 1 in selector.rs). - EppStandaloneConfig gains DYN_EPP_DATA_PARALLEL_SIZE (default 1) and DYN_EPP_KV_EVENT_PORT_STRIDE (default 1). Rank r publishes KV events on kv_event_port + r * stride; the reflector emits one KV-event endpoint per rank (RawWorker.kv_events_endpoints) and the registration carries data_parallel_size, which the selector passes through with data_parallel_start_rank 0. - Adds the session_context field the EPP's booking request was missing since the structured session context landed in the selection service, so the ext-proc crate builds again on this stack. Tests: strided per-rank endpoints for a 3-rank pod; existing reflector, adapter, and selector tests updated to the per-rank shape (144 pass). Signed-off-by: Ishan Dhanani <[email protected]> (cherry picked from commit bb2af62)
… membership A host owns discovery and exposes it as a WorkerCatalogSource: a stream of complete desired membership snapshots. CatalogReconciler applies each snapshot to a SelectionCore: it upserts new or changed records, retries records the core reported not schedulable, deletes workers that left (including ones that never converged), rejects duplicate ids before mutating anything, and clears the catalog when the source closes so selection fails closed. A CatalogObserver lets a host keep per-worker metrics in step. This is the reconcile loop the EPP standalone selector and the frontend's embedded partition each carried; both switch to it in the next commits. SelectionService exposes its core for hosts that drive the catalog directly. Signed-off-by: Ishan Dhanani <[email protected]>
…ogReconciler The runtime-config watch becomes a WorkerCatalogSource (RuntimeDiscoverySource) and the partition's catalog is driven by the shared CatalogReconciler instead of the router-local CatalogFeeder. The per-worker router_worker_registered gauge is kept through a CatalogObserver. Behavior is unchanged except that a worker the core reports not schedulable is now retried on every membership snapshot rather than only when its runtime config changes. Signed-off-by: Ishan Dhanani <[email protected]>
The standalone EPP's topology adapter yields the reflector's Ready pods as WorkerRequest snapshots (PodReflectorSource) and lets CatalogReconciler own the desired-versus-actual diff. Selector::reconcile, WorkerRegistration, and the EPP-local reconcile state are removed; their tests moved to dynamo-kv-router with the reconciler. A closed reflector channel still yields one empty snapshot so selection fails closed, as before. Signed-off-by: Ishan Dhanani <[email protected]>
ishandhanani
had a problem deploying
to
external_collaborator
September 3, 2026 21:58 — with
GitHub Actions
Failure
This was referenced Sep 3, 2026
Closed
Owner
Author
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.
Stack 1, group B (membership) of the unification DEP (#33, "Stack 1 DEP r2" comment). Stacked on #37.
Summary
One membership path for every host of
SelectionCore. Four logical commits:feat(epp): data-parallel worker registration in the standalone reflector— feat(epp): data-parallel worker registration in the standalone reflector #22 folded in unchanged: strided KV-event ports per data-parallel rank (DYN_EPP_DATA_PARALLEL_SIZE,DYN_EPP_KV_EVENT_PORT_STRIDE).feat(kv-router): WorkerCatalogSource and CatalogReconciler for worker membership— a runtime-free trait yielding complete desired snapshots, and the reconciler that applies them: upsert new or changed records, retry records the core reported not schedulable, delete workers that left (including never-converged ones), reject duplicate ids before mutating,CatalogObserverfor host metrics.SelectionService::core()exposes the core to hosts that drive its catalog.refactor(router): feed the embedded partition's catalog through CatalogReconciler— the runtime-config watch becomesRuntimeDiscoverySource; the router-localCatalogFeederis deleted; therouter_worker_registeredgauge is kept through an observer.refactor(epp): expose the pod reflector as a WorkerCatalogSource—PodReflectorSourcereplacesSelector::reconcile,WorkerRegistration, and the EPP-local reconcile state (net -185 lines in ext-proc); the reconcile tests moved todynamo-kv-router.lib/kv-routerstill never importsdynamo-runtime; the runtime-flavored source lives inlib/llm, the Kubernetes one in ext-proc.Behavior notes
Validation
cargo test -p dynamo-kv-router --features standalone-selection --lib: passes (membership tests: retry-and-delete, converge-and-reupsert, duplicate rejection).cargo test -p dynamo-llm --lib -- kv_router::: 325 passed.cargo test -p dynamo-ext-proc: 141 passed (includeschannel_close_clears_selector_topologythrough the new source).cargo clippyon all three crates: clean.Review notes (graham-code-review pass)
WorkerCatalogSourceusesasync_traitso it can be aBox<dyn>later; both crates already depend on it.Vec<WorkerRequest>and the reconciler clones a request only when it upserts.WorkerRequestgainedClone + PartialEqfor the converged cache; it is a control-plane record, not hot-path state.runtakes the source by value and spawns nothing itself; each host decides where the loop runs.