Disaggregated Prefill-Decode Architecture

Separating compute-bound prefill and memory-bound decode onto independent GPU pools for independent scaling. KV cache transfer mechanisms, routing, SLO-aware scheduling, and disaggregated KV cache pools.

Overview

Disaggregated prefill-decode (PD disaggregation) resolves the core tension in LLM inference: prefill and decode have opposite compute profiles, yet a co-located deployment makes them share GPUs and interfere. PD disaggregation gives each phase its own GPU pool, so each pool can be sized in hardware and tuned in software on its own.

The path of a request is short. A serving router takes the request and sends it to the prefill pool, which is compute-bound. The prefill pool transfers the request's KV cache to the decode pool, which is memory-bandwidth-bound, and the decode pool produces the generated tokens. This chapter explains why the two pools differ, what goes wrong when they share GPUs, and what it costs to move the KV cache between them.

Why prefill and decode are different

Prefill runs the whole prompt in parallel; decode produces one token per step. That single difference sets the hardware each phase wants.

  • Prefill handles the whole prompt in parallel in one step, for example 2048 tokens. Its linear layers are large matrix-matrix products, so its arithmetic intensity is high, hundreds of FLOPs per byte. It is bound by GPU compute (the tensor cores), so you buy hardware for TFLOPS per dollar.
  • Decode handles one token per request in each step. Its linear layers are matrix-vector products at batch 1 or a small batch B, so its arithmetic intensity is only about B * 2 / weight_bytes_per_output, below 1 FLOPs/byte at B=1. It is bound by HBM bandwidth, so you buy hardware for HBM bandwidth per dollar.

> [!TIP] The best prefill GPU and the best decode GPU can be different hardware generations; PD disaggregation lets you mix them.

Interview questions

  • Design a PD disaggregated serving system for a high-traffic LLM endpoint with TTFT < 500ms and TPOT < 50ms SLOs.

Sign up free to read the full topic

More AI Infrastructure topics

Start free on Cariara · Coding problems · System design studio