DEP: Dynamo-managed Elastic EP on Kubernetes
Summary
This DEP enables Elastic Expert Parallelism on Kubernetes by introducing
DynamoGraphDeploymentEngineGroup (DGDEngineGroup), a durable resource representing one
independently resizable distributed engine world. components[].replicas remains the number
of worlds. engineGroup.initialSize and the group's spec.replicas express initial and live
capacity in independently scalable replica allocations.
An immutable engine profile maps each replica to one or more capacity pods and one or more native engine members. Kubernetes supplies and releases complete replica allocations; the inference engine commits exact native membership. The Operator creates one Engine Group per DGD component replica and reconciles restart-safe growth, planned shrink with exact authorized release, and capability-dependent failure recovery.
Worked examples
The Engine Group worked examples show the important YAML, topologies, and lifecycle transitions. They are non-normative; this DEP remains authoritative.
Problem
Mixture-of-Experts models contain many feed-forward experts and route each token through only a subset of them. Expert Parallelism distributes those experts across accelerator processes, so expert-parallel width is a product of tensor-parallel size and the number of data-parallel workers. Adding or removing a data-parallel worker therefore changes EP width — which is why membership, not pod count, is the thing being scaled.
Elastic EP changes that membership in a running engine without replacing the complete engine world. The operation crosses three systems with different views of state:
- Kubernetes knows which pods, processes, GPUs, and network resources exist.
- The inference engine knows which native ranks belong to its committed topology.
- The Dynamo runtime knows whether the resulting endpoint may receive traffic.
These states change at different times. During growth, Kubernetes capacity exists before the engine admits it. During shrink, capacity remains allocated after the engine stops using it. After a failure, desired capacity is unchanged while the engine serves with fewer members.
Pod counts alone therefore cannot represent an elastic distributed engine. The control plane needs a durable engine-level record, separate from workload-controller state, that survives controller restarts and distinguishes physical allocation, availability, and committed membership — by identity, not only by count.
Goals
- Enable live Elastic EP growth, planned shrink, and capability-dependent failure recovery.
- Give every distributed engine world a stable API identity and independent status.
- Preserve
components[].replicasas the number of independent engine worlds. - Keep engine-specific topology and lifecycle semantics behind a narrow adapter and an immutable profile.
- Reuse workload managers for pod lifecycle, gang scheduling, topology, and rollout.
Behavioral goals are stated normatively as R1–R21 rather than repeated.
Non-goals
- Changing TP, PP, model, image, pod GPU allocation, or any other immutable profile property during a live membership operation.
- Splitting or merging an engine world in place.
- Defining how a Planner chooses between shapes such as
1 x EP32and2 x EP16, or any fleet split, merge, uniformity, or preemption policy. - Standardizing inference-engine internal state machines or transport protocols.
- Reimplementing workload-manager behavior in the Dynamo Operator.
- Removing the existing Ray-based Elastic EP path, which coexists.
Proposal
Core concepts
| Term | Meaning |
|---|---|
| Engine Group | One independently resizable distributed engine world: one coordinated membership, reconfiguration, and failure-recovery domain. |
| Replica | The smallest independently scalable capacity slice inside an Engine Group. One spec.replicas increment. |
| Replica allocation | The profile.podsPerReplica whole capacity pods backing one replica, placed and released together. |
| Capacity pod | One pod inside a replica allocation. The unit Kubernetes allocates, places, and deletes. |
| Native member | A backend-specific rank or member identity committed by the inference engine. |
| Engine profile | The immutable mapping between replicas, physical allocations, native members, bootstrap, topology, and supported operations. |
A replica is not necessarily one DP rank. Its profile maps it to fixed steady-state cardinalities:
one Engine Group replica
-> profile.podsPerReplica physical pods
-> profile.nativeMembersPerReplica native engine members/scale counts replicas. Pods remain the unit of physical allocation and release; native
members remain the unit of engine membership and traffic evidence.
Replica allocations are physically disjoint. Every capacity pod belongs to exactly one replica allocation. A replica may contain multiple native members, but those members share its placement, replacement, and release lifecycle. Two independently scalable replicas cannot share a pod because deleting that pod is the only way Kubernetes reclaims its GPUs.
Every native member also belongs to exactly one replica for a committed topology generation. Member-level failure may leave part of an allocation serving, but it does not make part of the pod independently reclaimable.
Capacity model
There are two scaling dimensions:
components[].replicas = number of independent engine worlds
DGDEngineGroup.spec.replicas = scalable replica allocations in one worldThe DGD creation surface uses a different noun to keep those dimensions visually distinct:
engineGroup.initialSize = initial replica allocations in each new worldA new group copies initialSize into spec.replicas; after that, spec.replicas is the
authoritative live target. Initialization and live scaling therefore use the same unit.
desired capacity pods =
spec.replicas x profile.podsPerReplica
desired native members =
spec.replicas x profile.nativeMembersPerReplicaControl-only pods, if present, sit outside this capacity count and are handled by the workload realization.
initialSize is immutable creation configuration and must satisfy policy and hard profile
bounds. Changing it or any other immutable launch geometry creates replacement worlds rather than
resizing an existing world in place.
A higher-level reshape such as 1 x EP32 to 2 x EP16 creates replacement worlds with the
appropriate initialSize for their resolved profiles. Choosing and sequencing that fleet
reshape remains outside this DEP.
Resource model
The DGD expresses world count and initial allocation size separately:
spec:
components:
- name: VllmDecodeWorker
type: worker
replicas: 2 # independent engine worlds
engineGroup:
initialSize: 2 # replica allocations per new world
policy:
minSize: 1 # scaling-policy bounds
maxSize: 8
podTemplate:
spec:
containers:
- name: main
resources:
limits:
nvidia.com/gpu: "4" # immutable allocation per podThe generated Engine Group uses the Kubernetes Scale convention:
spec:
replicas: 2
policy:
minReplicas: 1
maxReplicas: 8Capacity configuration and bounds have distinct meanings and owners:
| Surface | Meaning | Enforcement | Writer |
|---|---|---|---|
status.profile.min/maxSupportedReplicas |
Hard engine/profile capability bounds in allocation replicas | Derived each reconcile; violations rejected under R8a | None — read-only |
engineGroup.initialSize |
Initial replica allocations in each new world | Copied into a new group's spec.replicas; immutable |
Component author |
DGD engineGroup.policy.min/maxSize |
Initial scaling-policy bounds | Copied into the generated Engine Group policy | Component author or platform operator |
Group spec.policy.min/maxReplicas |
Live scaling-policy bounds | Continuously enforced | Component author or platform operator, not the target writer |
An autoscaler that writes spec.replicas does not thereby own spec.policy. HPA and KEDA
keep their own bounds in their own resources. Writing policy is configuration, not scaling.
The generated resource is owned by the DynamoGraphDeployment — not by a
DynamoComponentDeployment, which does not exist on the Grove path because the workload
providers are mutually exclusive.
Its primary counters deliberately separate allocation and membership:
| Field | Meaning |
|---|---|
spec.replicas |
Desired replica allocations |
status.replicas |
Allocated replicas with complete physical allocations; also Scale.status.replicas |
status.availableReplicas |
Replicas whose complete profile-defined native-member set is active and admitted |
status.desiredNativeMembers |
Exact stable native-member identity set assigned to the desired replica slots |
status.desiredNativeMemberCount |
Cardinality of desiredNativeMembers |
status.activeNativeMemberCount |
Exact committed active-member set cardinality |
activeReplicas is intentionally absent: a replica containing four members may have only three
active, so one replica-level active bit would lose information.
The DGD and Engine Group both expose counts but use different units. Their kubectl get views
need a UNITS column, and validation messages report the derived mapping, for example:
2 allocations map to 2 pods and 8 native DP members (TP1, EP8).The parent DGD rolls up only Engine Groups:
| DGD surface | Meaning for an Engine Group component |
|---|---|
spec.components[].replicas |
Desired Engine Groups |
status.components[name].replicas |
Existing, non-terminated Engine Groups |
status.components[name].availableReplicas |
Engine Groups whose Available condition is True |
A recovering group that remains available keeps the DGD ready while its Degraded and
Progressing conditions expose recovery. Inner allocation and native-member state is never
summed into an ambiguous DGD-level capacity field.
This TP1 profile maps each four-GPU pod to four native DP members. Rank dp-5 has failed and
the engine has committed the seven-member survivor topology. Desired physical capacity remains two
allocations.
apiVersion: nvidia.com/v1beta1
kind: DynamoGraphDeploymentEngineGroup
metadata:
name: elastic-ep-vllmdecodeworker-0
labels:
nvidia.com/dynamo-graph-deployment-name: elastic-ep
nvidia.com/dynamo-component: VllmDecodeWorker
nvidia.com/dynamo-component-replica: "0"
nvidia.com/dynamo-engine-group: elastic-ep-vllmdecodeworker-0
spec:
replicas: 2
policy: {minReplicas: 1, maxReplicas: 8}
status:
observedGeneration: 3
replicas: 2
availableReplicas: 1
desiredNativeMembers: ["dp-0","dp-1","dp-2","dp-3","dp-4","dp-5","dp-6","dp-7"]
desiredNativeMemberCount: 8
activeNativeMemberCount: 7
selector: >-
nvidia.com/dynamo-engine-group=elastic-ep-vllmdecodeworker-0,
nvidia.com/dynamo-scale-representative=true
profile:
fingerprint: "sha256:..."
podsPerReplica: 1
nativeMembersPerReplica: 4
minSafeServingNativeMembers: 4
minSupportedReplicas: 1
maxSupportedReplicas: 16
topologyGeneration: 2
operation:
id: "survivor-2"
intent: Recover
specGeneration: 3
baseTopologyGeneration: 1
targetReplicas: 2
targetNativeMembers: ["dp-0","dp-1","dp-2","dp-3","dp-4","dp-6","dp-7"]
affectedReplicas: ["replica-1"]
phase: Committed
committedTopologyGeneration: 2
replicaStates:
- replicaID: replica-0
representativeRef: {name: worker-0, uid: "uid-0"}
currentAllocation:
availability: Available
health: Healthy
capacityRefs:
- {name: worker-0, uid: "uid-0"}
nativeMembers:
- {id: "dp-0", membership: Active, traffic: Admitted}
- {id: "dp-1", membership: Active, traffic: Admitted}
- {id: "dp-2", membership: Active, traffic: Admitted}
- {id: "dp-3", membership: Active, traffic: Admitted}
- replicaID: replica-1
representativeRef: {name: worker-1, uid: "uid-1"}
currentAllocation:
availability: Available
health: Degraded
capacityRefs:
- {name: worker-1, uid: "uid-1"}
nativeMembers:
- {id: "dp-4", membership: Active, traffic: Admitted}
- {id: "dp-5", membership: Masked, traffic: Drained}
- {id: "dp-6", membership: Active, traffic: Admitted}
- {id: "dp-7", membership: Active, traffic: Admitted}
conditions:
- {type: Initialized, status: "True"}
- {type: Available, status: "True"}
- {type: TargetValid, status: "True"}
- {type: TopologyKnown, status: "True"}
- {type: Degraded, status: "True", reason: UnexpectedMembershipLoss}
- {type: Progressing, status: "True", reason: AwaitingReplacement}
- {type: TargetReached, status: "False", reason: NativeMembershipBelowTarget}Each replicaStates entry is one stable allocation slot. Physical replacement never creates a
second logical entry such as replacement-replica-1: the entry instead has at most one
currentAllocation and one candidateAllocation. The representative label selects exactly
one pod from the selected allocation for Scale bookkeeping; it is not availability, membership,
or traffic evidence.
By default, a candidate remains Dormant and has no native identity until identity reuse is
safe. A profile advertising surge membership may temporarily assign distinct native members to
both current and candidate allocations. In that case one replica can temporarily contain more
members than the steady-state nativeMembersPerReplica, but spec.replicas does not change.
Allocation availability, allocation health, native membership, and traffic are orthogonal:
| Field | Values | Authority |
|---|---|---|
allocation availability |
Available, Unavailable, Unknown |
Engine Group controller, from workload and runtime evidence for the members it currently backs |
allocation health |
Healthy, Degraded, Failed, Unknown |
Engine Group controller, from pod, node, accelerator, fabric, and runtime health |
member membership |
Active, Masked, Joining, Retiring, Unknown |
Committed engine state for Active and Masked; controller intent for Joining and Retiring |
member traffic |
Admitted, Draining, Drained, Withdrawn, Unknown |
Runtime or traffic adapter evidence; it does not prescribe router implementation |
An allocation may remain Available and Degraded while it backs surviving members. Pod
readiness is an input, not the definition: a pod-level probe may fail because one local rank died
while authoritative runtime and traffic evidence shows that other members still serve.
availableReplicas counts only replica slots whose complete steady-state member set is
Active and Admitted with usable backing capacity. Health Degraded does not by itself
exclude a replica if every member still serves. Thus the example has one available replica even
though both physical allocations still exist and seven members serve.
Unknown state is required. After a controller restart or lost engine connection the controller may know a pod exists without knowing its health, native membership, or traffic state. R12 depends on reporting that uncertainty rather than defaulting to a guess.
Operation status
status.operation is the durable record of the current engine-membership transaction. At most
one operation may have external effects at a time. Its record contains:
- a controller-minted
idandintent; - the source
specGenerationand exactbaseTopologyGeneration; - an immutable resolved plan from
Pendingonward, including the stabletargetReplicas, exact absolutetargetNativeMembers, and affected, joining, or retiring replica identities as applicable; - an optional queued replica target when a later Scale write arrives;
- phase, timestamps, optional backend operation ID, and committed topology generation; and
- on failure, a structured
RetryableorTerminalerror.
The stable desired native-member set is persisted separately from an operation target. It is the
exact identity set assigned to the desired replica slots by the latest accepted assignment or
remapping plan. It is not assumed to be 0..N-1. A survivor operation may commit a strict
subset without rewriting this desired set (R11). Restoration may reuse fixed slots; a completed
surge replacement may assign non-contiguous identities unless the backend advertises renumbering.
Member identities must be predictable before submission. The profile either defines a deterministic replica-and-local-ordinal mapping or the runtime adapter durably reserves identities and persists them in the operation before applying it.
The active operation is immutable. A changed health signal or topology never silently re-plans it.
If its plan becomes invalid before any request could have reached the backend, it terminates with
a structured failure and a new operation may be created. After submission may have occurred, it
remains Unknown and fail-closed until the authoritative result is recovered.
A later desired replica target is queued without changing the active operation. The controller first resolves the active operation, then creates a new one.
| Phase | Meaning |
|---|---|
Pending |
Durable; no membership call attempted. Capacity or traffic preconditions may still converge. |
Submitting |
The request may have reached the backend, but acknowledgement is unknown. Only this operation may be observed or replayed. |
Accepted |
The backend acknowledged this operation identity and exact target. |
Committing |
The backend is changing membership. |
Committed |
The exact expected member set and committed topology generation were authoritatively observed. |
Failed |
The backend explicitly rejected or failed the operation; the error states retryability. |
Unknown |
The controller cannot correlate the operation with authoritative backend state; mutation and release fail closed. |
Backends may skip phases they cannot distinguish. Conditions summarize resource health and convergence; they do not replace the operation record.
Conditions
| Condition | Meaning |
|---|---|
Initialized |
The exact initial topology has been authoritatively observed. Initial formation is not a synthetic membership operation. |
Available |
Topology is authoritative, every committed active member has usable backing capacity and passed required serving verification, and activeNativeMemberCount >= minSafeServingNativeMembers. It does not require the desired membership to be fully restored. |
Progressing |
Initial formation is converging, a membership or replacement operation is active, or authorized release remains unconfirmed. |
Degraded |
Unexpected loss relative to the last stable topology, or health-degraded capacity nominated for replacement. Planned shrink alone is not degradation. |
TargetReached |
Physical replica allocation has converged and the exact committed native-member identity set equals status.desiredNativeMembers, with no extra members. A committed survivor-operation subset does not rewrite desired membership. |
TargetValid |
The requested allocation target is representable. False only on reconcile-time rejection. |
TopologyKnown |
Committed native membership is authoritatively known. False or Unknown is the R12 fail-closed state. |
Progressing Degraded TargetReached Available
growth in flight True False False True
planned shrink in flight True FalseSource: ai-dynamo/dynamo