Every Layer← All lessons

Inference

Dynamo on a validated cluster

The runtime under NVIDIA Dynamo, the graph that deploys it, and a request whose prompt and answer run on different GPUs

NVIDIA Dynamo is a serving framework that sits around a model engine such as vLLM and makes many GPU workers act as one service. It routes each request to the worker that already holds its prefix, it can run the reading of a prompt and the writing of an answer on separate workers, and it scales each group by its own pressure. All of that assumes a cluster where drivers, GPU allocation, scheduling, networking and metrics already work together. This lesson builds from the bottom. It first assembles and checks that runtime with NVIDIA's AI Cluster Runtime, then deploys a Dynamo graph on it, and then follows one request and its KV cache from the front door to two different GPUs.

Chapter 1 of 11

What one model server on one GPU cannot do

Three groups of problems, and a list of questions about the cluster

A Deployment of vLLM Pods, one GPU each, serves a model. It stops being enough as the pool grows, and the reasons fall into three groups. The first is the shape of the work. Reading a prompt, prefill, is bound by compute. Writing the answer, decode, is bound by memory capacity and memory bandwidth. One worker doing both serves neither well, and splitting them needs something that moves the KV cache between workers at close to the speed of memory. The second is elasticity. Autoscaling on CPU or requests per second says little about the two numbers users feel, the time to the first token and the time between tokens. KV cache memory is a hard ceiling that long contexts and many users reach quickly, and a large model replica takes minutes to start. The third is orchestration. A serving graph that spans nodes cannot be scheduled as a unit by stock Kubernetes, operators want this without being tied to one engine, and a failing GPU strands the requests that were running on it.

Dynamo addresses these with disaggregated serving, routing that knows the KV cache, and autoscaling driven by latency targets, in front of vLLM, SGLang or TensorRT-LLM.

Underneath, a cluster has questions to answer first. Is the GPU Operator installed with a driver stack that matches the nodes? Are GPU nodes labelled and discoverable? Are GPUs exposed through the expected allocation driver? Can the scheduler place workers together with the required topology? Are node health signals available before work lands on a degraded node? Is Prometheus reachable? Is the Gateway path configured?

Chapter 2 of 11

The runtime under Dynamo, piece by piece

Eight prerequisites, and the component that meets each

NVIDIA's DSX AI Factory Platform contains a tool for this layer, the AI Cluster Runtime, AICR. It does not serve models. It packages Dynamo together with the cluster components Dynamo depends on into a recipe: a configuration for one environment and one kind of workload, with pinned versions, compatibility constraints and checks.

The components are worth knowing one by one, because each answers one of the questions. The NVIDIA GPU Operator installs the driver and GPU software stack on the nodes. Node Feature Discovery labels nodes so GPU nodes can be found. The DRA Driver for NVIDIA GPUs exposes GPUs through Dynamic Resource Allocation, the newer Kubernetes way for a Pod to claim a device. KAI Scheduler places GPU workers with topology in mind and with gang scheduling, which means a group of Pods is placed all together or not at all. Grove orchestrates serving graphs of several components, so they start, are placed and scale as coordinated groups. NVSentinel and Nodewright provide node health signals where the chosen recipe supports them. The Prometheus stack collects cluster, accelerator and Dynamo metrics. For ingress the recipe installs agentgateway, a Gateway API implementation, with Gateway API resources.

Dynamo itself arrives as the dynamo-platform chart, version 1.4.2 in this recipe. It contains the Dynamo operator, the runtime images and the custom resource definitions, among them DynamoGraphDeployment at API version nvidia.com/v1beta1, which replaces the earlier v1alpha1.

Chapter 3 of 11

A recipe from a snapshot

The cluster is described first, and the versions are chosen to fit it

AICR separates setting up the runtime from deploying an application, and it works in five steps. The first two produce the recipe.

Step one takes a snapshot. The command captures the state of the cluster that recipe selection and later validation need. With no placement flags it targets nodes labelled nvidia.com/gpu.present=true and tolerates the taints of GPU nodes. Step two generates the recipe. From the snapshot AICR identifies the Kubernetes distribution, the GPU accelerator and the operating system of the GPU nodes. The command adds two statements of intent: the workload is inference and the platform is dynamo. The output records pinned component versions, configuration for this environment, node selectors, tolerations, checksums, compatibility constraints and the checks to run later.

Pinning is the substance of it. For the Amazon EKS inference recipe for GB200 NVL72 and GB300 NVL72 systems, AICR v1.0.0 selects seventeen Helm charts at exact versions, from the GPU Operator at v26.7.1 to Dynamo Platform at 1.4.2. NVIDIA's AICR team tested those versions together on that platform and hardware, and that is what the word validated refers to at this stage: a combination that was tried, as opposed to the newest release of each part.

A recipe can also be checked without touching a cluster, against a snapshot captured elsewhere. That offline run evaluates the declarative constraints and reports the behavioural checks as skipped.

Chapter 4 of 11

Render, deploy, then prove it

A bundle in dependency order, and checks that run on the live cluster

Step three renders the recipe into a bundle: Helm values and manifests ready to deploy. Placement is decided here. Flags give the node selector and tolerations for accelerated nodes and, separately, for system nodes, so the GPU workloads and the supporting services land where they should. One setting restricts which source ranges may reach agentgateway. If the cluster has no default StorageClass, the command also needs one named.

Step four deploys. For a local run AICR writes a Helmfile. Components depend on each other, a CRD chart before the chart that uses it, and AICR encodes that as tiers. Helmfile works through the tiers in order and applies independent components inside a tier at the same time. Running apply again reconciles the installed releases with the bundle. Without Helmfile, the default Helm deployer writes a deploy.sh. For production AICR renders GitOps bundles for Argo CD or Flux.

Step five is what makes the runtime validated in the second sense. AICR runs validator Jobs on the live cluster, in two phases named deployment and conformance, and writes a report. They check the cluster baseline, down to a working nvidia-smi on the accelerator nodes, the health and version of the GPU Operator and of the Dynamo platform, DRA support, gang scheduling and autoscaling, Prometheus-backed metrics and the readiness of the Gateway. Only when they pass is the application's DynamoGraphDeployment installed. Performance validation is a separate run, because it deploys a temporary serving workload and occupies the GPUs under test.

Chapter 5 of 11

A graph where a Deployment used to be

One resource lists the frontend, the workers and their roles

On the validated runtime, a model is deployed as a DynamoGraphDeployment, DGD for short. It is the description of one running inference graph. Under spec.components it lists the parts by name and type. The types are frontend, worker, prefill, decode, planner and epp. A graph may hold up to 25 components, types may repeat, and only epp is limited to one. spec.backendFramework names the engine, and the operator uses it to inject the right defaults into each component's main container.

The Dynamo operator reconciles the graph, and what it creates depends on the pathway. On the Grove pathway, the one the AICR recipe sets up, the operator builds one PodCliqueSet straight from the graph and creates no DynamoComponentDeployment at all. Only on the path without Grove does it create a DynamoComponentDeployment for each component, and from those the Deployments or LeaderWorkerSets, the Pods and the Services. The status reports a componentKind per component: a plain Deployment, a LeaderWorkerSet, or with Grove a PodClique or PodCliqueScalingGroup. With Grove the whole graph is one PodCliqueSet, and KAI Scheduler can place the cliques as gangs and by network topology. That is the answer to the scheduling problem from the first chapter.

The component's type also becomes a Pod label, nvidia.com/dynamo-component-type, which routing later selects on. An aggregated graph has a frontend and workers that do both phases. A disaggregated graph replaces the workers with two components, one of type prefill and one of type decode. Each starts the same engine with --disaggregation-mode set to its role. Both must load the same model with the same block size and KV layout, or the cache one produces cannot be read by the other.

Chapter 6 of 11

Three planes: who is there, requests, and cache news

No etcd and no NATS in the default path

The parts of a graph talk on three separate planes. The discovery plane answers who is there. Outside Kubernetes Dynamo uses etcd for it, with a lease per runtime that expires ten seconds after the heartbeats stop. On Kubernetes the operator sets DYN_DISCOVERY_BACKEND to kubernetes, and discovery uses the cluster's own resources. Each worker writes a DynamoWorkerMetadata resource describing its endpoints, EndpointSlices signal which Pods are ready, and frontends watch both. No extra store is needed, and a Pod that disappears is cleaned up with it.

The request plane carries the requests from a frontend to a worker. In Dynamo 1.4.2 it runs over TCP by default.

The event plane carries news: KV cache changes, worker load and sequence tracking between router replicas. Its default transport is ZMQ, a messaging library without a broker. Each worker binds a publishing socket and advertises it through discovery, and subscribers connect to every publisher and adjust as workers come and go. NATS, a broker, remains an option, selected with DYN_EVENT_PLANE=nats. AICR's default path no longer uses it, and the dynamo-platform chart no longer installs it by default.

One detail is easy to miss. The vLLM engine inside a worker publishes raw cache events on a local ZMQ socket. The Dynamo worker runtime subscribes to that local source, normalises the events into Dynamo's own form and publishes them again on the event plane. Routers listen to Dynamo's stream, never to vLLM directly. Without events a router can only predict the cache from its own decisions, and prediction cannot see evictions.

Chapter 7 of 11

Path one: the Frontend chooses the worker

The smallest topology, and the one with the longest record in production

Dynamo has two routing paths on Kubernetes, and the runtime is validated for both. In the first, clients reach a Dynamo Frontend behind an ordinary Service. The Frontend is an OpenAI-compatible HTTP server with a router inside. Run with --router-mode kv, or the environment variable DYN_ROUTER_MODE=kv, it tokenizes each request, scores the eligible workers by how much of the prompt's prefix they hold and by their present load, picks one and sends the request over the request plane.

The score is a cost, and lower is better. For each worker the router takes the prefill blocks the request would need, reduces them by the blocks already cached there, scales the result and adds the worker's decode blocks. Two settings shift the balance. The overlap credit, a finite number of 0 or more with a default of 1, says how much a cached prefix counts. Values above 1 give a cached prefix extra credit, but the adjusted prefill cost is clamped at zero and never goes negative. At 0 the router ignores caches and does not even build its index. The prefill load scale, default 1, says how much prompt work counts against decode load.

This path suits a team that owns a model-specific endpoint, or an edge proxy that only needs to pass traffic on. It needs nothing beyond the frontend and the workers. NVIDIA calls it the smallest topology and the most production-proven. Agentic workloads are where it pays most. An agent's turns keep extending one long prefix of system prompt, tool definitions, history and tool results. A turn that lands on a worker without that prefix makes the GPU read all of it again.

Chapter 8 of 11

Path two: a Gateway and an endpoint picker

The same routing logic, with the Gateway carrying the traffic

The second path fits a platform team that runs shared ingress through the Gateway API and wants timeouts, retries and fallback handled there. A Gateway, agentgateway in the AICR example, resolves an HTTPRoute to an InferencePool, the resource of the Gateway API Inference Extension that stands for a set of model servers with an endpoint picker in front.

Nobody writes that pool by hand. Adding one component of type epp to the graph makes the Dynamo operator create the picker's Deployment and Service and an InferencePool named after the graph with the suffix pool. The pool's selector matches the worker Pods and its endpointPickerRef points at the picker. For each request the Gateway asks the picker, which tokenizes the prompt and runs Dynamo's KV router to choose an endpoint. The picker returns the choice and some routing metadata, and the Gateway, which is the real HTTP proxy here, forwards the request.

It does not forward to the engine. Each routable worker Pod carries a Frontend as a sidecar, named in the component's frontendSidecar field and run with --router-mode direct. The sidecar accepts the request, applies the picker's choice without choosing again, and hands it to the worker container over the request plane. In Dynamo 1.4 the picker is the extension's Go framework with Dynamo's Rust router embedded through CGO and configured through eppConfig. From Dynamo 1.5 a native Rust picker replaces that bridge and is configured with DYN_ environment variables. The topology around it stays the same.

Chapter 9 of 11

Prefill here, decode there

One request, two workers, and a hand-off in between

In a disaggregated graph one request is served by two workers in sequence. Execution has three steps: a prefill engine computes the prefill phase and produces the KV cache, the cache is transferred to a decode engine, and the decode engine generates the tokens.

A router stage called the PrefillRouter orchestrates it. The Frontend activates it by itself when it discovers a decode worker and a prefill worker registered for the same model. The stage first selects a prefill worker, with KV-aware routing, since this is where a cached prefix saves work. It sends the request there. The prefill worker computes the cache and returns a small result, disaggregated_params, with the metadata a decode worker needs to fetch it. For vLLM that is kv_transfer_params: block IDs and how to reach the prefill worker. The router then selects a decode worker and sends it the request with that metadata. The decode worker pulls the cache, generates, and streams the answer back through the Frontend.

The decode choice follows different rules. Overlap scoring is switched off there, because decode routing should not chase prefix reuse, and prompt tokens are not counted as its load. With vLLM, prefill runs to completion before decode starts. SGLang lets decode begin while the transfer proceeds. A failure after the request has been sent to prefill is returned to the caller. The router does not fall back to serving it as an aggregated request.

Chapter 10 of 11

The cache crosses the fabric

From one GPU's memory to another's, and why the transport decides everything

The decode worker now has to get the KV cache out of the prefill worker's GPU memory and into its own. Dynamo's transfer layer for this is NIXL. It moves the cache directly from the memory of one GPU to the memory of the other, and the transfer does not block either engine: forward passes for other requests continue meanwhile. NIXL itself sits on a lower communication library, UCX or libfabric, which drives the actual transport.

Which transport is available decides whether disaggregation helps or hurts. Between two Pods the fast in-server link, NVLink, cannot be used, even on one node. Pods are separate processes with separate GPUs assigned, and NVLink peer access needs both GPUs inside one process. That leaves the network. With RDMA, over InfiniBand, RoCE or on AWS the EFA adapter, the network card reads and writes memory directly. With GPUDirect RDMA it reads and writes GPU memory, so the cache never passes through host memory or the kernel. Without RDMA the transfer falls back to TCP: out of the GPU into host memory, through the kernel's network stack, and back up on the other side.

Dynamo's documentation puts numbers on the difference: 200 to 500 times slower, with an observed time to first token of about 98 seconds over TCP against 200 to 500 milliseconds with RDMA. A cluster without an RDMA fabric should serve aggregated.

Chapter 11 of 11

Scaling each pool, and losing a worker

Replica counts owned by an autoscaler that thinks in token latency

Two pools can be sized separately, and that is the point of splitting them. Prefill replicas follow input length and prompt reuse. Decode replicas follow concurrency, output length and KV memory in use. Disaggregation supports any mix of x prefill and y decode workers and changes at run time. A new worker registers through discovery and publishes its configuration, including its KV capacity. A worker being removed drains its requests and deregisters.

In the graph, a component opts into autoscaling with a scalingAdapter field, even an empty one. The operator then creates a DynamoGraphDeploymentScalingAdapter that owns the replica count and implements the Kubernetes Scale subresource, so HPA, KEDA or Dynamo's Planner can drive it. The Planner is the autoscaler built for this. It has four optimisation targets. throughput is the default and scales on queue depth and KV cache utilisation. latency scales earlier. load uses thresholds you set for the prefill queue and decode KV utilisation. sla aims at stated values for first-token and inter-token time. It plans capacity on a long interval, 180 seconds by default, and corrects for bursts on a short one, 5 seconds.

Workers also fail. Request migration, configured on the Frontend and off by default, moves a generation in progress to a healthy worker and continues from the exact token where it stopped. One limit to know: scaling a worker pool to zero is not fully supported. With no worker left the Frontend removes the model from its list and answers 404.

What to keep

Check the ground, then build the graph on it

Dynamo on Kubernetes is two layers. The lower one is a runtime of ordinary cluster components, the GPU Operator, a DRA driver, KAI Scheduler, Grove, health and metrics, a Gateway, that AICR selects as a recipe of pinned versions, deploys in dependency order and then checks on the live cluster. The upper one is a DynamoGraphDeployment that names a frontend, the workers and their roles. Requests enter through Dynamo's Frontend or through a Gateway with an endpoint picker, and both route on the cache state that workers publish. In a disaggregated graph one worker reads the prompt, NIXL moves the KV cache to another over RDMA, and that one writes the answer. Each pool then scales by the pressure it feels.