Roles in DisaggregatedSet
A Role in DisaggregatedSet represents a distinct operational phase in a disaggregated serving architecture (e.g., prefill, decode, or encode). Each role defines its own pod specifications, scaling properties, and replica topology.
Relationship to Child LeaderWorkerSets
Each role defined in a DisaggregatedSet specification maps directly to an independent child LeaderWorkerSet managed by the DisaggregatedSet controller:
DisaggregatedSet "my-inference"
├── roles[0]: prefill → LeaderWorkerSet "my-inference-0-<rev>-prefill"
├── roles[1]: decode → LeaderWorkerSet "my-inference-0-<rev>-decode"
└── roles[2]: encode → LeaderWorkerSet "my-inference-0-<rev>-encode"
Child LeaderWorkerSets follow the naming convention:
<DisaggregatedSet-name>-<slice>-<revision-hash>-<role-name>
The revision hash in the child resource name is dynamic across updates. Always select child resources using Kubernetes labels (disaggregatedset.x-k8s.io/name, disaggregatedset.x-k8s.io/role, disaggregatedset.x-k8s.io/slice) rather than hardcoding names.
Role Configuration Fields
A DisaggregatedSet spec defines a roles list where each entry represents a role (DisaggregatedRoleSpec):
| Field | Type | Description |
|---|---|---|
name | string | Unique name for this role within the set (e.g., prefill, decode, encode). |
scaling | RoleScaling | Optional scaling configuration. scaling.mode: External delegates replica management to an external autoscaler (e.g., HPA/KEDA via DisaggregatedSetRoleScaler). Default is Static. |
spec.replicas | *int32 | Number of LWS replicas (pod groups) for this role per slice. |
spec.leaderWorkerTemplate | LeaderWorkerTemplate | Full pod template defining the leader and worker pod containers, resource requests/limits, restart policies, and subgroup configurations for this role. |
spec.rolloutStrategy | RolloutStrategy | Optional rolling update configuration for this role. DisaggregatedSet coordinates updates across roles to maintain capacity ratios. |
Example Multi-Role Configuration
Here is an example DisaggregatedSet defining independent prefill and decode roles with different pod group sizes and hardware accelerator configurations:
apiVersion: disaggregatedset.x-k8s.io/v1
kind: DisaggregatedSet
metadata:
name: disaggregatedset-sample
spec:
roles:
- name: prefill
spec:
replicas: 2
leaderWorkerTemplate:
size: 4
workerTemplate:
spec:
containers:
- name: vllm-prefill
image: vllm/vllm-openai:latest
resources:
limits:
nvidia.com/gpu: "8"
- name: decode
spec:
replicas: 4
leaderWorkerTemplate:
size: 2
workerTemplate:
spec:
containers:
- name: vllm-decode
image: vllm/vllm-openai:latest
resources:
limits:
nvidia.com/gpu: "4"
Independent Per-Role Capabilities
Because each role maps to an independent child LeaderWorkerSet, each role inherits all core LWS features tailored to its specific workload phase:
- Heterogeneous Hardware: Prefill servers can run on high-bandwidth, high-compute accelerator nodes (e.g., 8-GPU tensor-parallel groups), while decode servers run on memory-optimized nodes (e.g., 2-GPU or 4-GPU groups).
- Independent Group Sizes:
Each role configures its own
leaderWorkerTemplate.sizeand optionalsubGroupPolicy. - Independent Autoscaling:
Prefill and decode roles can be scaled dynamically based on distinct metric signals (e.g., time-to-first-token vs. inter-token-latency) using
DisaggregatedSetRoleScaler. - Dedicated Storage:
Each role can configure its own
volumeClaimTemplatesfor local model caching or intermediate tensor offloading.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.