Worked examples for DEP #13121: Engine Group lifecycle
DEP #13121 — Worked Engine Group examples
[!NOTE] This is a non-normative companion to DEP #13121. It illustrates the important spec, status, ownership, and transition states. The DEP is authoritative if the two differ.
1. The two independent dimensions
components[].replicas = independent engine worlds
DGDEngineGroup.spec.replicas = independently scalable allocations inside one worldOne Engine Group replica is a stable allocation slot:
one replica
-> profile.podsPerReplica physical pods
-> profile.nativeMembersPerReplica native engine membersEvery capacity Pod belongs to exactly one replica. Several native members may share that replica, but Kubernetes cannot allocate, replace, or release them independently.
The picture uses two members per replica only to show the relationship. The immutable profile defines the real cardinalities.
2. Two valid profiles
| Simple profile | Packed-rank profile | |
|---|---|---|
| TP | 4 | 1 |
| GPUs per Pod | 4 | 4 |
podsPerReplica |
1 | 1 |
nativeMembersPerReplica |
1 | 4 |
| Two allocations provide | DP2 / EP8 | DP8 / EP8 |
The simple profile remains useful for explaining ordinary growth and shrink. The packed profile is required when ranks need intra-node NVLink and that connectivity is available only to processes inside the same Pod.
A multi-Pod profile is also valid. For example TP16 on 8-GPU Pods has
podsPerReplica: 2 and nativeMembersPerReplica: 1.
3. Healthy packed EP8 world
DGD
apiVersion: nvidia.com/v1beta1
kind: DynamoGraphDeployment
metadata:
name: elastic-ep
spec:
backendFramework: vllm
components:
- name: VllmDecodeWorker
type: worker
replicas: 1 # one independent engine world
engineGroup:
initialSize: 2 # two allocation replicas
policy:
minSize: 1
maxSize: 8
podTemplate:
spec:
containers:
- name: main
# The resolved profile launches four TP1 native members in this Pod.
resources:
limits:
nvidia.com/gpu: "4"
status:
conditions:
- {type: Ready, status: "True"}
components:
VllmDecodeWorker:
replicas: 1 # existing Engine Groups
availableReplicas: 1 # Available Engine GroupsGenerated Engine Group
apiVersion: nvidia.com/v1beta1
kind: DynamoGraphDeploymentEngineGroup
metadata:
name: elastic-ep-vllmdecodeworker-0
spec:
replicas: 2 # allocation replicas, not DP ranks
policy:
minReplicas: 1
maxReplicas: 8
status:
observedGeneration: 1
replicas: 2
availableReplicas: 2
desiredNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
desiredNativeMemberCount: 8
activeNativeMemberCount: 8
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: 1
operation: null
replicaStates:
- replicaID: replica-0
representativeRef: {name: g0-r0, uid: a0}
currentAllocation:
availability: Available
health: Healthy
capacityRefs: [{name: g0-r0, uid: a0}]
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: g0-r1, uid: a1}
currentAllocation:
availability: Available
health: Healthy
capacityRefs: [{name: g0-r1, uid: a1}]
nativeMembers:
- {id: dp-4, membership: Active, traffic: Admitted}
- {id: dp-5, membership: Active, traffic: Admitted}
- {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: "False"}
- {type: Progressing, status: "False"}
- {type: TargetReached, status: "True"}The mapping is:
2 allocations x 1 Pod/allocation = 2 Pods
2 allocations x 4 members/allocation = DP8
TP1 x DP8 = EP84. Outer scale: one world to two worlds
Changing the DGD component from replicas: 1 to replicas: 2 creates a second independent
Engine Group. It does not resize the first world.
sequenceDiagram
participant U as DGD scaling owner
participant D as DGD controller
participant W as Workload manager
participant G as New Engine Group
U->>D: components[].replicas = 2
D->>G: Create world 1 with initialSize = 2
G->>W: Request initial complete world
W-->>G: Two allocations placed
G-->>D: Initial exact topology committed and Available
D-->>U: Two worlds exist and are AvailableResulting topology:
The two worlds have independent membership, traffic, failure, and topology generations.
5. Inner growth: EP8 to EP12
Changing one Engine Group from spec.replicas: 2 to 3 requests one new allocation. In the
packed profile that allocation contains four new native members.
before: 2 allocations, members dp-0..dp-7, EP8
after: 3 allocations, members dp-0..dp-11, EP12sequenceDiagram
participant S as Scale writer
participant C as Engine Group controller
participant W as Workload manager
participant A as Runtime adapter
participant E as Engine
participant T as Traffic authority
S->>C: spec.replicas = 3
C->>W: Allocate replica-2
W-->>C: Pod g0-r2 ready with exact UID
C->>A: Bootstrap dp-8 through dp-11
A-->>C: Runtime and communication checks pass
C->>A: Apply exact target dp-0 through dp-11
A->>E: Commit larger membership
E-->>A: Generation 2 committed
A->>T: Admit dp-8 through dp-11
T-->>C: Per-member admission evidenceResulting topology, while the second world remains unchanged:
Before commit, the third allocation can exist while activeNativeMemberCount remains eight.
Pod readiness never implies membership.
6. Failure and replacement: EP8 → EP7 → EP4 → EP8
Starting point
The world is the healthy packed EP8 world above:
replica-0 / g0-r0 = dp-0, dp-1, dp-2, dp-3
replica-1 / g0-r1 = dp-4, dp-5, dp-6, dp-7Assume the GPU backing dp-5 fails. The other three members in g0-r1 can still serve, but
Kubernetes cannot replace or release only the failed GPU allocation. Repair ultimately replaces
the complete Pod.
Ownership and sequence
This is three engine operations:
EP8 -> EP7 survivor commit
EP7 -> EP4 retire every remaining member of the affected allocation
EP4 -> EP8 restore its four stable member slots on replacement capacityThe physical Scale target and stable desired member set dp-0..dp-7 stay unchanged throughout.
Each recovery operation has its own exact targetNativeMembers; committing a survivor subset
does not rewrite desired membership.
t1 — failure observed, survivor commit not complete
The controller has physical and health evidence but does not invent engine membership. It
withdraws dp-5, retains all capacity, and waits for an authoritative survivor commit.
status:
replicas: 2
desiredNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
desiredNativeMemberCount: 8
operation:
id: survivor-2
intent: Recover
targetReplicas: 2
targetNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-6, dp-7]
affectedReplicas: [replica-1]
phase: Submitting
conditions:
- {type: Available, status: "False", reason: AwaitingSurvivorCommit}
- {type: Degraded, status: "True", reason: UnexpectedMembershipLoss}
- {type: Progressing, status: "True", reason: AwaitingEngineCommit}
- {type: TargetReached, status: "False"}No release authorization exists.
t2 — EP7 survivor topology committed
status:
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
topologyGeneration: 2
operation:
id: survivor-2
intent: Recover
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-1
representativeRef: {name: g0-r1, uid: a1}
currentAllocation:
availability: Available
health: Degraded
capacityRefs: [{name: g0-r1, uid: a1}]
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: Available, status: "True"}
- {type: Degraded, status: "True", reason: UnexpectedMembershipLoss}
- {type: Progressing, status: "True", reason: AwaitingReplacement}
- {type: TargetReached, status: "False", reason: NativeMembershipBelowTarget}
- {type: TopologyKnown, status: "True"}The allocation is Available because it still backs three serving members and Degraded
because it no longer provides its complete intended set. availableReplicas is one because only
replica-0 has its complete four-member set active and admitted.
A Pod readiness probe may fail at this point. Pod readiness is not authoritative membership or traffic evidence.
t3 — remaining members retired; EP4 committed
The backend must support retiring dp-4, dp-6, and dp-7 while dp-5 is already
inactive. For a non-tail allocation this also requires selected retirement or remapping.
status:
replicas: 2
availableReplicas: 1
desiredNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
desiredNativeMemberCount: 8
activeNativeMemberCount: 4
topologyGeneration: 3
operation:
id: retire-allocation-3
intent: Recover
targetReplicas: 2
targetNativeMembers: [dp-0, dp-1, dp-2, dp-3]
affectedReplicas: [replica-1]
phase: Committed
committedTopologyGeneration: 3
replicaStates:
- replicaID: replica-1
representativeRef: {name: g0-r1, uid: a1}
currentAllocation:
availability: Unavailable
health: Degraded
capacityRefs: [{name: g0-r1, uid: a1}]
nativeMembers:
- {id: dp-4, membership: Masked, traffic: Drained}
- {id: dp-5, membership: Masked, traffic: Drained}
- {id: dp-6, membership: Masked, traffic: Drained}
- {id: dp-7, membership: Masked, traffic: Drained}
safeToRelease:
operationID: retire-allocation-3
topologyGeneration: 3
capacityRefs:
- {name: g0-r1, uid: a1}
conditions:
- {type: Available, status: "True"} # four active members meet the safe minimum
- {type: Degraded, status: "True"}
- {type: Progressing, status: "True", reason: AwaitingReleaseConfirmation}
- {type: TargetReached, status: "False"}The controller—not the engine—constructs safeToRelease from correlated membership, traffic,
runtime-incarnation, and Pod-UID evidence. The workload manager deletes only that UID.
t4 — replacement candidate
After the old runtime incarnation is stopped or fenced and its UID is gone, a candidate allocation
is created under the same stable replica-1 entry.
status:
replicas: 2
availableReplicas: 1
desiredNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
desiredNativeMemberCount: 8
activeNativeMemberCount: 4
operation:
id: restore-4
intent: Recover
targetReplicas: 2
targetNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
affectedReplicas: [replica-1]
phase: Committing
replicaStates:
- replicaID: replica-1
representativeRef: {name: g0-r1b, uid: b1}
candidateAllocation:
availability: Available
health: Healthy
binding: Assigned
capacityRefs: [{name: g0-r1b, uid: b1}]
nativeMembers:
- {id: dp-4, membership: Joining, traffic: Withdrawn}
- {id: dp-5, membership: Joining, traffic: Withdrawn}
- {id: dp-6, membership: Joining, traffic: Withdrawn}
- {id: dp-7, membership: Joining, traffic: Withdrawn}
conditions:
- {type: Available, status: "True"}
- {type: Degraded, status: "True"}
- {type: Progressing, status: "True", reason: AwaitingEngineCommit}
- {type: TargetReached, status: "False"}A Pod or container restart is a new runtime incarnation. It may reuse dp-4..dp-7 only after
the previous incarnations are stopped or fenced and the R16 bootstrap contract binds the new
processes to the current topology generation.
t5 — EP8 restored
status:
replicas: 2
availableReplicas: 2
desiredNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
desiredNativeMemberCount: 8
activeNativeMemberCount: 8
topologyGeneration: 4
operation:
id: restore-4
intent: Recover
targetReplicas: 2
targetNativeMembers: [dp-0, dp-1, dp-2, dp-3, dp-4, dp-5, dp-6, dp-7]
affectedReplicas: [replica-1]
phase: Committed
committedTopologyGeneration: 4
replicaStates:
- replicaID: replica-1
representativeRef: {name: g0-r1b, uid: b1}
currentAllocation:
availability: Available
health: Healthy
capacityRefs: [{name: g0-r1b, uid: b1}]
nativeMembers:
- {id: dp-4, membership: Active, traffic: Admitted}
- {id: dp-5, membership: Active, traffic: Admitted}
- {id: dp-6, membership: Active, traffic: Admitted}
- {id: dp-7, membership: Active, traffic: Admitted}
conditions:
- {type: Available, status: "True"}
- {type: Degraded, status: "False"}
- {type: Progressing, status: "False"}
- {type: TargetReached, status: "True"}Capability boundary
The representation does not imply every backend supports the sequence.
The backend must advertise:
- survivor commit with an inactive member;
- shrink across an already inactive member;
- selected retirement when the allocation is not the high-rank suffix;
- fixed-slot restoration or explicit member remapping; and
- authority recovery when the affected member is the control authority.
If any required step is unsupported, Dynamo fails closed and recreates the Engine Group.
7. Optional surge replacement: EP7 → EP11 → EP8
With spare capacity and the required backend capabilities, the controller may create a candidate allocation before retiring the old allocation's three survivors.
EP7 active:
dp-0, dp-1, dp-2, dp-3, dp-4, dp-6, dp-7
EP11 surge:
old survivors plus dp-8, dp-9, dp-10, dp-11
final EP8 without renumbering:
dp-0, dp-1, dp-2, dp-3, dp-8, dp-9, dp-10, dp-11Two facts remain unchanged:
spec.replicasandoperation.targetReplicasremain two;- the stable
replica-1entry temporarily has active members across current and candidate allocations.
Surge is optional. It requires growth from degraded membership, active candidate assignment, temporary over-target membership, and selected retirement. The baseline DEP does not require it.
8. Planned replacement before failure
If health marks a GPU degraded while every member still serves:
currentAllocation:
availability: Available
health: Degraded
nativeMembers:
- {id: dp-4, membership: Active, traffic: Admitted}
- {id: dp-5, membership: Active, traffic: Admitted}
- {id: dp-6, membership: Active, traffic: Admitted}
- {id: dp-7, membership: Active, traffic: Admitted}The replica still counts in availableReplicas, and the Engine Group remains
TargetReached=True. Dynamo may nominate the complete allocation for replacement under R17.
Retirement still requires draining every member and committing them inactive before Pod release.
A dormant make-before-break candidate may be placed first when the profile supports it. It holds capacity but has no native identity until reuse is safe.
9. Control-authority loss
The profile records which native member holds control authority.
- Losing another member in the same Pod is not automatically authority loss.
- Losing the authority member itself requires backend-advertised authority recovery.
- Without that capability, Dynamo recreates the complete Engine Group.
- Replacement of the authority allocation also recreates the group unless authority can move and report the exact committed topology and operation result.
For example, vLLM rank 0 may also host the TCPStore master or DP coordinator, while SGLang's primary launch cohort owns control responsibilities. Those are backend profile facts, not Grove semantics.
10. Node-loss variant
If the complete node disappears rather than one GPU failing:
- every native member in its replica allocations becomes unavailable or unknown;
- a missing kubelet cannot prove process termination;
- Pod or Node deletion is not fencing;
- replacement waits for power-off or equivalent fencing unless the profile prevents stale generations from rejoining; and
node.kubernetes.io/out-of-serviceapplies only after node fencing.
How many native members are lost depends on the profile. The packed TP1 example loses four if the whole Pod disappears; the single-GPU failure loses only one initially.
11. What each system owns
| Step | Owner |
|---|---|
| Detect Pod, node, GPU, or fabric health | Kubernetes and infrastructure health systems |
| Maintain desired allocation count | Engine Group scaling owner |
| Allocate, place, replace, and delete Pods | Workload manager and scheduler |
| Map replicas, Pod UIDs, incarnations, and native members | Engine Group controller with runtime evidence |
| Commit and report exact membership | Inference engine through the runtime adapter |
| Enforce and report member admission and drain | Runtime or traffic authority |
| Authorize exact Pod release | Engine Group controller |
| Delete only authorized UIDs | Workload manager |
Grove and the engine do not communicate directly. Dynamo observes both systems, calls the engine-facing runtime contract, and relays only engine-neutral allocation intent and exact release authorization to the workload manager.
Source: ai-dynamo/dynamo