Unit 1 of 12

What is NVIDIA Dynamo?

  • 55 min
  • Reading, walkthrough, and knowledge check

What you’ll learn

  • Say which jobs NVIDIA Dynamo takes on around an inference engine and which jobs stay inside vLLM, SGLang, or TensorRT-LLM.
  • Name the decisions a fleet of workers must make that a single engine never sees, and put numbers on one of them.
  • Trace one request through Dynamo’s request plane, control plane, and state path, and say which component owns each step.
  • Decide from workload facts whether one engine, plain replicas, or Dynamo components fit a deployment.
  • Start a one-frontend, one-worker Dynamo deployment and prove that a worker is registered before you trust it.

What Dynamo adds around an engine

Suppose you serve Llama 3.1 8B with vLLM on one 80 GB H100 and it meets your latency targets. Traffic grows four times, so you start three more copies and put a load balancer in front. Now each copy has its own KV cache, and a user’s second message may land on a copy that has never seen the first. Long prompts on one copy slow the token stream of everyone else on it. When a copy crashes, the requests it was generating fail. None of these is a bug in vLLM: they are fleet problems.

NVIDIA Dynamo is an open-source framework for serving a model across many engine workers. It does not run the model. vLLM, SGLang, or TensorRT-LLM still load the weights, schedule batches, manage the KV cache on their GPUs, and run the kernels. Dynamo adds the layer around them: one client-facing frontend, a registry of live workers, a router that picks a worker for each request, KV cache movement between workers, and control loops that size the pools.

Who owns what in a Dynamo deployment
JobOwnerWhere you tune it
Weights, kernels, attention, samplingThe engineEngine flags passed through the worker
Batching and KV blocks inside one workerThe engineEngine flags such as --max-model-len
HTTP API, chat template, tokenizationDynamo frontendFrontend flags
Which worker gets a requestDynamo router--router-mode and router flags
Which workers exist and are aliveDynamo discovery--discovery-backend
Moving KV cache between workers or memory tiersNIXL and KVBMBackend transfer and offload settings
How many prefill and decode workers to runPlanner and Kubernetes operatorPlanner configuration

The boundary matters most when something breaks. A slow kernel, an out-of-memory error at startup, or a bad batch size is an engine problem, and the engine courses cover it. A request sent to a dead worker, a cache that another worker holds, or too few decode workers is a fleet problem. Changing a kernel setting cannot fix a stale worker list.

ClientOpenAI SDKor curlDynamofrontendHTTP,template,tokenize,routedynamo.vllmworkerwrappervLLMenginescheduler, KVcache,kernelsDiscoveryfile, etcd, orKubernetesJSONtoken IDssame processregisterwatchDynamoenginecontrol
The smallest Dynamo deployment is two processes. The frontend owns HTTP, templates, tokenization, and routing; the worker process wraps an unchanged engine and registers itself so the frontend can find it.

Two details in the figure surprise people coming from vllm serve. First, the frontend applies the chat template and tokenizes, then sends token IDs to the worker, so the engine’s own OpenAI server is not in the path. Second, Dynamo pins its own engine versions. Release 1.4.2 is tested with vLLM 0.26.0, SGLang 0.5.16, and TensorRT-LLM 1.3.0rc22, not the vLLM 0.28.0 and SGLang 0.5.18 used in this academy’s engine courses. A flag added to vLLM after 0.26.0 does not exist inside a Dynamo 1.4.2 worker.

How frontier labs serve AI at scale · Watch on YouTube

Decisions a fleet makes that one engine never sees

One engine gets requests and decides how to batch them. It never has to choose where a request goes, because there is nowhere else. Once you run several workers, six new questions appear, and each one maps to a Dynamo component and a later lesson in this course.

Fleet decisions and the Dynamo part that makes each one
DecisionThe questionDynamo partLesson
MembershipWhich workers exist, serve this model, and are ready?Discovery and healthFrontend and workers
PlacementWhich worker should take this request: the idle one or the one holding its prefix?RouterKV-aware routing
Phase splitShould prompt processing and token generation run on the same GPUs?Prefill and decode workersDisaggregated serving
State movementHow does a KV cache reach the worker that needs it, or spill to CPU memory?NIXL and KVBMNIXL and the KV system
CapacityHow many workers of each kind should run right now?PlannerPlanner and autoscaling
FailureWhat happens to requests in flight when a worker dies?Migration, cancellation, drainingObservability and resilience

Placement is the easiest to put numbers on. Recall from the KV cache lesson that Llama 3.1 8B stores 128 KiB of KV cache per token, and that prefill computes it for every prompt token the engine has not cached. Take a chat that shares a 2,000-token system prompt with every other chat. Each turn adds a 200-token user message and a 300-token reply. On its fifth turn, the prompt is 2,000 + 4 × 500 + 200 = 4,200 tokens. How much of that must be computed depends entirely on which worker gets it.

Prefill for turn 5 on three different workers, Llama 3.1 8B on one H100 (idealized)

  1. Compute per prompt token (2 FLOPs per parameter)2 × 8.03 billion = 16.06 GFLOP
  2. Worker holding this chat’s history (4,000 tokens cached)200 new tokens × 16.06 GFLOP = 3.2 TFLOP
  3. Worker holding only the system prompt2,200 new tokens × 16.06 GFLOP = 35.3 TFLOP
  4. Worker that has seen neither4,200 new tokens × 16.06 GFLOP = 67.5 TFLOP
  5. Time at the 989 TFLOPS dense BF16 peak3.2 ms, 35.7 ms, and 68.2 ms
  6. KV cache written for the full prompt4,200 × 128 KiB = 525 MiB

ResultThe same request costs 21 times more prefill on a cold worker than on the one holding its history

These times are lower bounds: real kernels do not reach peak, and attention adds work that grows with prompt length. The ratio is what matters. It shows up directly in time to first token (TTFT), and it compounds: a request sent to the wrong worker also writes another 525 MiB copy of the same history into a second worker’s cache.

020406080Holds the chat historyHolds the chat history: 3.2 ms3.2 msHolds the system promptHolds the system prompt: 35.7 ms35.7 msCold workerCold worker: 68.2 ms68.2 ms
Where a request lands decides how much prompt it recomputes. The worker holding the chat’s history does about a twentieth of the prefill work of a cold worker (idealized times at peak compute).

The obvious fix, always sending a request to the worker with the longest cached prefix, creates the next problem. If every chat shares that system prompt, the first worker to cache it wins every new chat and becomes a hot spot while three GPUs idle. A fleet router has to weigh cache overlap against load on every request. The exercise below makes that trade-off concrete.

Follow one request through the three planes

Dynamo’s architecture guide splits the system into three planes. Keeping them apart is the single most useful habit for diagnosing a Dynamo deployment, because each plane fails differently.

  • The request plane carries the request and its tokens: frontend, router, prefill workers, and decode workers. It is the data plane in general networking terms, and it is tuned for low overhead per token.
  • The control plane decides what should exist: the planner computes worker counts, the Kubernetes operator applies them, and discovery records which endpoints are alive.
  • The storage and events plane keeps cache state visible and movable: workers publish KV events when blocks are stored or evicted, NIXL moves KV blocks between GPUs, and KVBM offloads blocks to CPU memory or disk.
ClientHTTPFrontendvalidate,tokenizeRouteroverlap andloadPrefillworkercomputesprompt KVDiscoverylive endpointsDecodeworkergeneratestokensPlannerworkercountsKV eventsblocksstored,evictedrequesttoken IDsprefilldecodeKV by NIXLpublishcache viewlive workersscalerequest planeKV statecontrol plane
One disaggregated request. The request plane (blue) carries it from the client through the router to a prefill worker and then a decode worker, whose tokens stream back through the frontend. KV state (teal) moves by NIXL and reaches the router as KV events. The control plane (orange) tracks live workers and resizes the pools.

Here is the same request in order. It follows the end-to-end narrative from the Dynamo 1.4.2 architecture overview, in disaggregated mode, where prefill and decode run on different workers.

  1. The frontend accepts it

    The client sends an OpenAI-compatible request to port 8000. The frontend validates the JSON, applies the chat template, and tokenizes the prompt. The next lesson covers this boundary in detail.

  2. The router picks a prefill worker

    It scores the live prefill workers on how much of the prompt each has cached and how much work each already has, then sends the token IDs to the cheapest one.

  3. Prefill computes the prompt's KV cache

    The prefill worker runs the whole prompt through the model and returns transfer metadata (disaggregated_params) that says where the cache is and how to reach it.

  4. The router picks a decode worker

    It forwards the request, with that metadata attached, to a decode worker.

  5. The KV cache moves

    The decode worker coordinates with the prefill worker for a direct GPU-to-GPU transfer through NIXL, over NVLink, InfiniBand, or PCIe. The blocks never pass through the frontend.

  6. Decode streams tokens back

    The decode worker generates tokens and streams them to the frontend, which detokenizes them and sends them to the client.

  7. State and capacity catch up

    Workers publish KV events so the router’s view of who caches what stays current, KVBM may offload cold blocks, and the planner reads the new load when it next recomputes worker counts.

In aggregated mode, which is where every deployment should start, one worker does both prefill and decode, so steps 3 to 5 collapse into one. The router still runs inside the frontend process by default, using round-robin until you set --router-mode kv. Discovery defaults to etcd on bare metal and to Kubernetes resources under the Dynamo operator; for a single host, --discovery-backend file needs neither. Requests travel from frontend to worker over TCP unless you choose NATS.

Go deeperIntegrated and sidecar backends, and why the frontend tokenizes

Dynamo 1.4.2 connects engines in two ways. An integrated backend, such as python3 -m dynamo.vllm, runs the Dynamo worker and the engine in one process: the wrapper registers endpoints, receives token IDs, and calls the engine’s Python API directly. An experimental sidecar backend runs a stock engine server beside a CPU-only Dynamo sidecar and calls the engine’s native gRPC API. The sidecar keeps the engine’s own serve command but does not yet cover every feature of the integrated backends.

Tokenizing in the frontend is a deliberate choice. The router needs token IDs to compute prefix overlap before it can choose a worker, so the prompt must be tokenized before routing anyway. Doing it once in a Rust frontend avoids tokenizing again in each engine’s Python API server. The frontend therefore needs the model’s config.json and tokenizer files, though not its weights.

The implementation follows the same split: performance-sensitive runtime pieces (HTTP, routing, transport) are Rust, and backend integration is Python so it can call each engine’s Python API.

Try it: route chat traffic across four workers

This toy simulation needs Python 3.9 or later and NumPy, and runs on a laptop. Forty chats share a 2,000-token system prompt and send 400 turns in random order to four workers. Each worker finishes 250 tokens of work between two arrivals, so the fleet can absorb 1,000 tokens per arrival. The script compares three placement policies: round-robin, pure cache affinity (always the longest cached prefix), and a cost that adds cache misses to the work already queued.

fleet_routing.py
import numpy as np

WORKERS, CONVERSATIONS, TURNS = 4, 40, 400
SYSTEM, USER, REPLY = 2_000, 200, 300  # tokens; every chat shares SYSTEM
DRAIN = 250  # tokens of work each worker finishes between two arrivals

rng = np.random.default_rng(7)
arrivals = rng.integers(CONVERSATIONS, size=TURNS)  # which chat speaks next


def simulate(policy):
    held = np.zeros((WORKERS, CONVERSATIONS), dtype=int)  # cached prefix tokens
    has_system = np.zeros(WORKERS, dtype=bool)
    turns = np.zeros(CONVERSATIONS, dtype=int)
    queue = np.zeros(WORKERS)  # tokens of work waiting on each worker
    prefilled, deepest = 0, 0
    for step, chat in enumerate(arrivals):
        prompt = SYSTEM + turns[chat] * (USER + REPLY) + USER
        reuse = np.maximum(held[:, chat], np.where(has_system, SYSTEM, 0))
        uncached = prompt - reuse
        if policy == "round-robin":
            w = step % WORKERS
        elif policy == "cache only":
            w = int(np.argmin(uncached))  # longest prefix match wins
        else:  # cache and load: add the work already queued on each worker
            w = int(np.argmin(uncached + queue))
        queue = np.maximum(queue - DRAIN, 0)
        queue[w] += uncached[w] + REPLY
        deepest = max(deepest, queue.max())
        prefilled += uncached[w]
        held[w, chat], has_system[w] = prompt + REPLY, True
        turns[chat] += 1
    return prefilled, deepest, int(has_system.sum())


for policy in ("round-robin", "cache only", "cache and load"):
    prefilled, deepest, warm = simulate(policy)
    print(f"{policy:>14}: prefilled {prefilled:>7,} tokens, deepest queue "
          f"{deepest:>7,.0f} tokens, prompt cached on {warm} of {WORKERS}")
You should see
   round-robin: prefilled 446,500 tokens, deepest queue  51,000 tokens, prompt cached on 4 of 4
    cache only: prefilled  82,000 tokens, deepest queue 102,250 tokens, prompt cached on 1 of 4
cache and load: prefilled  92,000 tokens, deepest queue   2,500 tokens, prompt cached on 3 of 4

Read the three lines as three failure modes and one fix.

  • Round-robin ignores the cache. Every turn lands on a worker that lacks most of its chat’s history, so the fleet prefills 446,500 tokens, more than 5 times the minimum. Recomputation alone pushes demand past what the four workers can drain, and queues reach 51,000 tokens.
  • Cache only prefills the minimum: 2,000 tokens once, then 200 per turn, for 82,000 in total. But the first worker to cache the system prompt wins every chat forever. It receives 500 tokens of work per arrival and drains 250, so its queue grows to 102,250 tokens while three GPUs sit idle.
  • Cache and load pays for the system prompt on two more workers and recomputes a little history, 10,000 extra tokens in all, and in exchange keeps the deepest queue at 2,500 tokens.

The model is deliberately crude: real workers batch, real queues are measured in time, and Dynamo’s router counts KV blocks rather than tokens. The shape of the result still holds, and it is the reason Dynamo’s KV router scores both overlap and load. The KV-aware routing lesson covers the real cost function.

The deployment runbook below the lesson needs a Linux machine with an NVIDIA GPU and Docker. It starts the two-process deployment from the first figure and shows you how to prove a worker is registered.

When one engine is enough

Every Dynamo component adds processes, configuration, and failure modes. The right question is not whether Dynamo is useful in general but whether your workload has the fleet problem a component solves. Start from the numbers.

A chat product at peak: 24 concurrent chats averaging 4,000 tokens of context, Llama 3.1 8B on one H100 (idealized)

  1. KV cache held24 × 4,000 × 128 KiB = 11.7 GiB, well inside a cache budget of about 50 GB
  2. Weights read per decode step16.06 GB / 3.35 TB/s = 4.8 ms
  3. KV cache read per decode step96,000 tokens × 131,072 B = 12.6 GB; 12.6 GB / 3.35 TB/s = 3.8 ms
  4. Lower bound per decode step4.8 + 3.8 = 8.6 ms
  5. Upper bound on output rate24 tokens / 8.6 ms ≈ 2,800 tokens per second

ResultOne GPU holds this load with room to spare; run a second for availability

For that workload a single vLLM or SGLang server meets the need, and two of them behind an ordinary load balancer give you redundancy. Dynamo would add a frontend hop and moving parts without solving a problem you have. Compare an agent platform with 400 concurrent sessions of 30,000 tokens each: that is 400 × 30,000 × 128 KiB = 1,465 GiB of KV cache, the cache budget of about 30 H100s, with long shared prefixes that are expensive to recompute. There, placement, offload, and capacity decisions dominate, and a fleet layer earns its cost.

Match the evidence to the smallest answer
What you measureSmallest answer
One replica meets TTFT and inter-token latency targets at peakOne engine, plus a second for availability
Several replicas needed, prompts rarely share prefixesPlain replicas and a standard load balancer, or Dynamo with round-robin if you want its frontend and failover
Long shared prefixes (system prompts, multi-turn chats, agents) and a low prefix-cache hit rate across replicasDynamo frontend with --router-mode kv
Long prompts stall other users’ token streams, and prefill and decode need different amounts of GPUSeparate prefill and decode workers
Traffic swings over hours and GPUs take minutes to startThe planner, first in an advisory mode
The KV cache you want to keep exceeds GPU memoryKV offload to CPU memory or disk through KVBM

Adopt one row at a time, and keep the previous configuration as the baseline you must beat on the same workload. If the measurement does not improve, the simpler design is the correct one.

Common mistakes

Symptoms, causes, and fixes when adopting Dynamo
SymptomLikely causeFix
Latency got worse after moving from one engine to Dynamo, and nothing else improvedComponents were added without a fleet problem to solve.Measure the engine alone and the one-worker Dynamo deployment on the same workload. Add a component only when a measurement shows the problem it solves.
/health returns 200 but chat requests failThe frontend’s health answer does not require a worker; its instances list is empty.Read the instances list and GET /v1/models, not just the status code.
A vLLM flag from the vLLM course is rejected by the Dynamo workerDynamo 1.4.2 pins vLLM 0.26.0, older than the 0.28.0 in the vLLM course.Check the flag against the pinned engine version before copying commands between courses.
The frontend and worker never see each otherThey use different discovery backends or namespaces, or file discovery on two machines.Give every component the same --discovery-backend and --namespace. Use file only for processes that share a filesystem.
Cache-aware routing made one GPU hotPlacement follows the cached prefix without enough weight on load.Compare workers’ queue depth and active KV blocks; tune the router’s cost, covered in the KV routing lesson.

How teams adopt Dynamo, and what to measure

Teams that run Dynamo in production rarely switch everything on at once. A path that keeps each step measurable looks like this:

  1. Benchmark the engine alone on your real prompt and output lengths. That is the baseline.
  2. Put the Dynamo frontend and one aggregated worker in front of the same engine, and confirm the latency overhead is small and the API behaves the same.
  3. Add workers with the default round-robin router and confirm throughput scales with worker count.
  4. Switch to --router-mode kv and compare TTFT and prefix-cache hit rate against round-robin on a workload with shared prefixes.
  5. Try separate prefill and decode pools only when long prompts are hurting inter-token latency.
  6. Move to Kubernetes with the Dynamo operator, then run the planner in advisory mode before you let it scale anything.

NVIDIA’s published results show what the fleet layer can buy on workloads that fit it. The Dynamo 1.4.2 architecture overview reports about 3 times faster TTFT and 2 times lower average request latency for KV-aware routing compared with random routing, measured with 100,000 requests to DeepSeek-R1-Distill-Llama-70B in FP8 on two H100 nodes, averaging 4,000 input and 800 output tokens. Treat these as evidence that the mechanism works, not as a prediction for your traffic, and measure your own.

Whatever you adopt, watch a few signals from day one: TTFT and inter-token latency percentiles per model at the frontend (dynamo_frontend_time_to_first_token_seconds), the number of registered instances, the prefix-cache hit rate on each worker, and queue depth per worker. Every later lesson in this course adds to that list.

Cheat sheet

  • Dynamo coordinates engines; vLLM, SGLang, or TensorRT-LLM still run the model inside each worker.
  • Dynamo 1.4.2 pins vLLM 0.26.0, SGLang 0.5.16, and TensorRT-LLM 1.3.0rc22.
  • A fleet adds six decisions: membership, placement, phase split, state movement, capacity, and failure.
  • Request plane: frontend, router, prefill and decode workers. Control plane: planner, operator, discovery. State: KV events, NIXL, KVBM.
  • The frontend templates and tokenizes; workers receive token IDs.
  • Placement trades cache overlap against load; either one alone fails at scale.
  • Frontend /health can return 200 with no workers. Check instances and /v1/models.
  • Start aggregated with one worker, measure, and add one component per proven problem.

Walkthrough

Follow one request through a Dynamo fleet

Request traceReady
Code example Optional · Dynamo surrounds the engine
text
client → frontend → router → vLLM / SGLang / TensorRT-LLM workers
                         ↘ discovery, KV events, metrics, planning

Quick reference

APIs and configuration

API or settingWhat it doesInputOutputLimitations
Dynamo runtimeRun components that register endpoints and call each other by nameA namespace, component names, and endpoints such as generate, plus discovery and request-plane settingsA set of discoverable processes that talk over TCP (default) or NATSEvery component must share the namespace and discovery backend, or they never find each other.
FrontendExpose one OpenAI-compatible HTTP endpoint and route to workersOpenAI JSON on port 8000 (--http-port)Templated, tokenized requests sent to a worker, and responses or SSE streams backThe engine still runs the model; the frontend adds a hop and owns templating and tokenization.
DiscoveryTrack which worker endpoints and models are registeredRegistrations from workers through file, etcd, mem, or kubernetesThe live instance list the router chooses from, visible in the frontend’s /healthRegistered is not the same as healthy: a worker can be listed and still fail requests until discovery drops it.

Optional deployment reference

Run the smallest Dynamo deployment around a real engine

Start one frontend and one aggregated vLLM worker on a single GPU, prove that the worker registered, and send an OpenAI-compatible request through the frontend. This two-process deployment is the baseline every later topology in the course has to beat. You need a Linux host with an NVIDIA GPU, Docker, and the NVIDIA Container Toolkit; the model is the small Qwen3-0.6B, which is not gated.

Before you start

  • A Linux host with one NVIDIA GPU that no other process is using, a driver new enough for the CUDA 13.0 runtime in the 1.4.2 images (the compatibility matrix lists 580.xx or later), Docker, and the NVIDIA Container Toolkit.
  • Network access to nvcr.io for the vllm-runtime:1.4.2 image and to Hugging Face for Qwen/Qwen3-0.6B.
  • Three terminals: one for the frontend, one for the worker, and one for requests.
  • An HF_TOKEN only if you swap in a gated model such as Llama 3.1 8B.
Step 1

Enter a pinned runtime

The vllm-runtime image bundles Dynamo 1.4.2 with the vLLM release it was tested against, 0.26.0, so the worker wrapper and the engine agree. --gpus all exposes the GPU. --network host lets the frontend, the worker, and your curl commands share localhost:8000 without port mapping. --rm deletes the container on exit, so record anything you want to keep.

bash
export DYNAMO_VERSION=1.4.2
docker run --gpus all --network host --rm -it \
  nvcr.io/nvidia/ai-dynamo/vllm-runtime:${DYNAMO_VERSION}

# Run the remaining commands inside this container.
What to check

A shell prompt inside the container. Run nvidia-smi there and confirm your GPU is listed with no other processes. From a host terminal, record the image digest with docker image inspect --format '{{index .RepoDigests 0}}' nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.4.2. An error that no GPU devices are available means the NVIDIA Container Toolkit is missing or not configured.

Step 2

Start frontend and aggregated worker

Run the frontend in the first shell. For the worker, open a second shell in the same container with docker exec -it <container-id> bash (get the ID from docker ps). With --discovery-backend file, both processes read and write registrations under $TMPDIR/dynamo_store_kv, so they must share a filesystem; two shells in one container do, and no etcd is needed. The frontend owns HTTP, templating, tokenization, and an embedded round-robin router. The worker wraps vLLM, loads the weights, and registers its endpoint and model.

bash
# Terminal 1
python3 -m dynamo.frontend \
  --http-port 8000 \
  --discovery-backend file

# Terminal 2 in the same container/host filesystem
python3 -m dynamo.vllm \
  --model Qwen/Qwen3-0.6B \
  --max-model-len 4096 \
  --discovery-backend file
What to check

The frontend starts within a few seconds and waits for workers. The worker downloads the model, prints vLLM’s usual startup lines (weight loading and KV cache size), and then registers. Only after registration will the frontend accept requests for Qwen/Qwen3-0.6B. If the worker exits with an out-of-memory error, another process holds the GPU; if it runs but the frontend never sees it, the two processes are not using the same discovery backend or filesystem.

Step 3

Verify the public contract

Run these from a third shell. Each check proves something different: /health shows what discovery sees, /v1/models shows which model names the frontend will route, and the chat request proves the whole path from HTTP to engine and back.

bash
curl -fsS http://127.0.0.1:8000/health
curl -fsS http://127.0.0.1:8000/v1/models | python3 -m json.tool
curl -fsS http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"Qwen/Qwen3-0.6B","messages":[{"role":"user","content":"What layer does Dynamo add?"}],"temperature":0,"max_tokens":80}' \
  | python3 -m json.tool
What to check

/health returns JSON with "status": "healthy", an endpoints list, and an instances list holding one worker. The frontend answers 200 even when instances is empty, so read the list, not the status code. /v1/models lists Qwen/Qwen3-0.6B. The chat response has one choice and a usage block. Its content starts with <think>, because no reasoning parser is configured yet, and finish_reason is likely length, because Qwen3 spends much of its 80 tokens thinking. Both are expected here.

Settings explained

SettingWhat it controlsOperational guidance
backend imageWhich engine, and which engine version, the worker wraps: vllm-runtime, sglang-runtime, or tensorrtllm-runtime, tagged 1.4.2.Pin the image by digest. Dynamo 1.4.2 is tested with vLLM 0.26.0, SGLang 0.5.16, and TensorRT-LLM 1.3.0rc22; features from newer standalone releases are not inside it.
discovery-backendHow components find each other: etcd (the default), file, mem, or kubernetes.Use file on one host, etcd on bare-metal clusters, and let the Kubernetes operator set kubernetes. Every component in a deployment needs the same backend and the same --namespace.
http-portThe frontend’s listening port (default 8000); --http-host sets the address and defaults to 0.0.0.0.The frontend offers TLS but no user authentication of its own. Keep it on a private network behind a gateway that authenticates callers.
engine argumentsNative engine flags the worker passes through, such as --max-model-len or --tensor-parallel-size for vLLM.Tune them as in the engine courses, checked against the pinned engine version. Measure the engine alone before blaming the fleet layer for a slow request.

Validation checklist

  • /health returns 200 and its instances list contains exactly one worker.
  • /v1/models lists Qwen/Qwen3-0.6B before you send the first completion.
  • The chat request returns 200 with usage.prompt_tokens and usage.completion_tokens filled in.
  • After you stop the worker, instances empties and chat requests fail with an error status instead of hanging.

Optional exercise

Measure what the Dynamo layer adds to one working engine, and name the first fleet problem that would justify adding more.

  1. Run the three runbook steps and save the image digest, both launch commands, and the /health and /v1/models output.
  2. Send the same chat request 20 times through the frontend and record the median and slowest latency with curl -w '%{time_total}'.
  3. Stop both Dynamo processes, start vllm serve Qwen/Qwen3-0.6B --max-model-len 4096 with the vLLM installed in the same image, send the same 20 requests, and compare.
  4. Write one paragraph naming which fleet decision (membership, placement, phase split, state movement, capacity, or failure) your real workload would need first, and the measurement that would prove it.
What to save
The image digest, launch commands, /health and /v1/models output, 20 latencies for each path, and your paragraph.
Test a failure
With traffic idle, stop only the worker with Ctrl+C. Poll /health once per second and record how many seconds pass before instances is empty, then send a chat request and record the status code and message. Restart the worker and record how long it takes to register again.
Cleanup
Stop the worker and the frontend, confirm with ps that no dynamo or vllm processes remain, and exit the container. Because it was started with --rm, Docker deletes it; the downloaded model goes with it unless you mounted a cache directory.

How to use it

When and how to use it

Reach for Dynamo when you run, or are about to run, several engine replicas and the hard problems are about the fleet: which worker gets a request, where reusable KV cache lives, how much prefill versus decode capacity to run, and what happens when a worker disappears. One replica that meets its targets does not need it.

Engine interoperability

vLLM, SGLang, and TensorRT-LLM workers sit behind the same frontend and router, each wrapped by its own dynamo.<backend> module at the engine version the release pins.

Modular adoption

The frontend, KV router, disaggregated workers, planner, and KVBM are separate pieces. Start with the frontend and one worker and add the others one at a time.

Infrastructure choice

The same components run as local processes with file or etcd discovery, or on Kubernetes under the Dynamo operator, which sets discovery for you.

Distributed inference

KV-aware routing, separate prefill and decode pools with NIXL transfers, KV offload, request migration, and autoscaling address the fleet decisions one engine never faces.

System workflow

  1. 1

    Benchmark the engine alone on your real prompt and output lengths.

  2. 2

    Name the fleet decision that limits you, with the measurement that shows it.

  3. 3

    Run the Dynamo frontend and one aggregated worker, and confirm the API and latency match the baseline.

  4. 4

    Add the one component that addresses the named decision, and record which plane it lives on.

  5. 5

    Rerun the same benchmark and keep the change only if the target metric improved.

Split engine jobs from fleet jobs

engine: model execution, scheduler, local KV cache
Dynamo: frontend, discovery, routing, KV transfer, planning, fleet health
What to expect

Each incident goes to the right owner. Kernel speed, batching, and per-GPU memory stay engine questions; which worker, which cache, and how many workers are Dynamo questions.

Troubleshooting

If something goes wrong

What you observeEvidence to collectNext experiment
Adding Dynamo made latency worse and did not improve throughput or reliability.Run the same workload against the engine alone and against one Dynamo frontend with one worker. Compare TTFT and total latency percentiles, and note which components are running.If the one-worker deployment matches the engine, remove components added later one at a time until the regression disappears. Keep only those that improve a measured target.
A latency incident bounces between the engine team and the platform team.Place the delay on a plane: frontend preprocessing and routing (request plane), worker queue, prefill, and decode (engine), KV transfer (state), or missing workers (control). Frontend TTFT histograms and worker logs for one request narrow it down.Give each plane an owner, a metric, and an alert. Change the component that owns the measured delay instead of retuning everything.
The deployment works in steady state but requests fail whenever a worker restarts.Stop one worker while sending traffic. Record how long the frontend keeps listing it in /health, what status the failed requests got, and whether any in-flight request was retried.Enable request migration for in-flight requests, drain workers before stopping them, and make clients retry only requests that had not started streaming. Later lessons cover each.
/health returns 200 but every chat request returns an error.Read the instances list in /health and call GET /v1/models. Check that the worker’s log shows it registered, and that both processes use the same --discovery-backend and namespace.Fix discovery so the worker appears, then resend. Add an alert on the instance count so an empty list pages someone before users notice.

Knowledge check

What does Dynamo replace?

Choose one answer

Sources and further reading

Finished this unit?