Roles in DisaggregatedSet
Configuring roles (prefill, decode, encode) and their independent pod specifications in DisaggregatedSet.
DisaggregatedSet is a Kubernetes controller and CRD (Custom Resource Definition) that extends LeaderWorkerSet (LWS) to support disaggregated inference workloads — use cases where different roles (e.g., prefill, decode, encode) need to run on separate, independently-scaled groups of pods.
This is especially useful for large language model (LLM) inference services where:
DisaggregatedSet was introduced in KEP-766 to address these multi-role, multi-resource serving patterns with a single, declarative Kubernetes resource.
DisaggregatedSet does not replace LeaderWorkerSet — it orchestrates multiple LeaderWorkerSets.
Each role defined in a DisaggregatedSet spec maps to an independent LeaderWorkerSet, deployed
in the same namespace. Child LeaderWorkerSets use a slice index and a revision hash in their names:
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"
Naming format: <DisaggregatedSet-name>-<slice>-<revision-hash>-<role-name>.
The revision hash is dynamic — always select child resources with labels
(disaggregatedset.x-k8s.io/name, disaggregatedset.x-k8s.io/role,
disaggregatedset.x-k8s.io/slice) rather than hardcoding names.
Each child LWS inherits standard LWS capabilities such as subgroup policies, exclusive placement, volume claim templates, and health monitoring. Rollout strategy for the set is owned by the DisaggregatedSet controller (see below).
LWS-native — DisaggregatedSet is built on top of LWS, not alongside it. This means LWS features (failure handling, subgroup topology, exclusive placement) are available per role. Note: rollout strategy is owned by the DisaggregatedSet controller, which replaces the per-LWS rollout to coordinate updates across roles.
Coordinated rollouts — Rollouts across roles are coordinated by DisaggregatedSet to preserve capacity ratios (e.g., prefill-to-decode ratio) throughout the update process. Partition-based rollout is not supported.
Declarative — The entire multi-role inference topology is expressed in a single YAML manifest, making it easy to version-control and apply via GitOps.
Configuring roles (prefill, decode, encode) and their independent pod specifications in DisaggregatedSet.
Replicating multi-role serving topologies with DisaggregatedSet slices.
Co-locating roles within slices and spreading slices across topology domains.
Autoscaling individual DisaggregatedSet roles with HorizontalPodAutoscaler (HPA) and KEDA via DisaggregatedSetRoleScaler.
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.