Skip to main content
This lesson inspects the real manifests used by the P/D (prefill/decode) well-lit path and compares them with what our live cluster actually runs. The goal is to show how close the production manifests are to a straightforward, honest deployment — without faking cross-node memory transfers or simulating specialized NICs. The core idea: prefill and decode stress hardware differently. Prefill performs a big read over long contexts and builds cache state (KV blocks). Decode streams tokens back, incrementally consuming that state. Splitting the phases lets you tune each independently and — on appropriate hardware and topology — can increase tokens-per-second by ~70% for long prompts, mixed traffic, and lockstep expert groups.
We won’t fake cross-machine memory transfers. Instead, we’ll inspect the real P/D manifests and compare them to what our cluster actually runs — the distance between them is smaller than you might expect.
A dark-themed slide titled "Read It, Don't Fake It" showing two highlighted cards: a teal "Our Live Cluster — Optimized baseline" card on the left and an outlined "P/D Well-Lit Path — The real manifests" card on the right. A rounded button labeled "Look at what we run" sits below.

1) Inspect what the cluster actually runs

Start by listing pods and their labels in the llm-d namespace:
In our cluster the model pods all share the same role label: Example output (trimmed):
The llm-d.ai/role label is the key switch:
Table: label roles and intent

2) How manifests change for P/D split

Adopting the P/D split introduces a second deployment for prefill. The layout (relevant files) looks like:
Both deployments run the same vLLM binary, but they carry different role labels so the router and EPP (Endpoint Picker Plugin) can treat them differently. Essential fragments from each deployment:

3) The decode pod sidecar (routing proxy)

When enabling P/D, a small routing-proxy sidecar is added to decode pods. It acts as the receiving dock for KV blocks that prefill pods produce. The sidecar listens on the pod’s external port (8000); vLLM is moved behind it on 8200.
A slide diagram titled "A Passenger in Every Decode Pod" showing a Decode Pod with a routing-proxy sidecar (labeled "The receiving dock") connected by an arrow to a vLLM component. A patch-sidecar.yaml element is shown as being added by one patch.
Sidecar + vLLM snippet (decode deployment):

4) One pool, two roles — how routing binds them

Both prefill and decode deployments join a single inference pool. Note the pool selector matches on a shared llm-d.ai/guide label, not llm-d.ai/role. That allows the router to treat them as one fleet while roles differentiate scheduling behavior internally. Router chart fragment:
Result: one service endpoint for clients, one pool of model servers, but two internal pod roles for P/D orchestration.

5) The Endpoint Picker Plugin (EPP) — scheduling profiles and decider

The EPP config holds the P/D routing logic. It loads plugin-style filters/scorers and defines two scheduling profiles — prefill and decode. Filters match pod labels (llm-d.ai/role) and a decider plugin marks requests that should be split. EPP plugin excerpt:
Scheduling profile snippet (weights used in our cluster):
Table: high-level EPP behavior

6) Request flow with P/D enabled

Step through a long request:
  • Client → Inference gateway.
  • Gateway invokes EPP: the decider marks the request for P/D and EPP picks a prefill pod first (based on prefill profile).
  • Prefill pod reads the prompt, performs the heavy model pass and produces saved work (KV blocks).
  • KV blocks are transferred to the chosen decode pod (point-to-point transfer).
  • Decode pod — with the routing-proxy sidecar receiving the blocks — resumes from the saved state and streams tokens back to the client.
The transfer uses a connector configured in the vLLM arguments (KV transfer connector) and a chosen block size. Example vLLM args in the prefill deployment:

7) NIXL — the KV transfer library

What is NIXL? It is an inference transfer library used to accelerate point-to-point KV block transfers in disaggregated LLM deployments. In practice it reduces transfer latency and overhead for large KV caches.
An infographic titled "What Is NIXL?" describing NIXL (NVIDIA Inference Xfer/Transfer Library) with a logo and three feature badges: Open source, Vendor-agnostic, and Point-to-point. Below that is a schematic showing large KV caches and memory blocks labeled Prefill pod memory and Decode pod memory.
Two quick notes:
  • Block size (--block-size=128) determines KV granularity. Smaller blocks mean more transfers but finer-grained caching; larger blocks reduce per-transfer overhead but may move extra state.
  • The connector selection (NixlConnector) and kv_role determine whether the pod sends, receives, or does both (kv_both).
Sitting right beside another old friend: a block size of 128. That block size determines the granularity of KV blocks moved between prefill and decode. Back on the diagram: the sidecar receives the blocks, and the decode pod picks up exactly where the prefill pod left off, writing the answer token-by-token and streaming it back to the user.
A diagram titled "The Stream Comes Back" showing request flow from a user through an Inference Gateway to Prefill Pods and Decode Pods (vLLM). A sidecar receives the blocks and the system streams the answer back token-by-token.

Key takeaways

  • The P/D split separates heavy, bursty prefill reads from low-latency decode streams; this allows independent tuning and can greatly increase throughput for long-context workloads.
  • You do not need a fundamentally different vLLM binary: the split is implemented by labels, a tiny sidecar, EPP scheduling profiles, and a KV transfer connector.
  • We do not simulate cross-node transfers in this lesson; instead we read the real manifests and show the genuine patches and configurations used in the P/D well-lit path.
  • If you adopt P/D in production, ensure your network topology and NICs can handle low-latency, high-throughput point-to-point transfers (this is where the split pays off).

Watch Video