# KV Cache-Aware Routing and P/D Disaggregation on Kubernetes — Yuchen Fama & Ashish Kamra, Red Hat
<!--
ref: @content/youtube/aie/kv-cache-aware-routing-and-p-d-disaggregation-on-kubernetes-yuchen-fama-ashish-kamra
tags: [KV cache, llm-d, prefill-decode disaggregation, Kubernetes inference, agent workloads, GLM, vLLM, RDMA]
version: 3
updated_at: 2026-11-24T04:29:29.303Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=YXowceUKYJI)**

# KV Cache-Aware Routing and P/D Disaggregation on Kubernetes — Yuchen Fama & Ashish Kamra, Red Hat

*Synthesized from Yuchen Fama and Ashish Kamra's talk on AI Engineer, 2026-08-27.*

Ashish Kamra (senior performance manager at Red Hat) and Yuchen (product manager for Red Hat Inference, working on vLLM) present the talk in two parts. The transcript renders some product names phonetically; this summary uses the project names as written in the title and slides, such as llm-d and prefill.

## Core Thesis
Yuchen argues that agent workloads break the assumptions behind classic LLM serving: sessions run to thousands of steps, the prompt structure is set by the client, and cache reuse dominates cost. Ashish argues that splitting prefill and decode onto separate pods, with KV-cache-aware routing in front, is worth doing when the network can carry KV cache between them, and that it is not a universal fix.

## Key Insights
- **Agent workload shape.** Multi-turn sessions run from a few steps to about 3,000 steps. The system prompt and tool definitions are reused, so cache hit rates are often above 90%. Input-to-output ratios often exceed 100:1; the dataset used in the case study was about 45:1.
- **Cache pricing.** The speakers cite a tenfold price gap between cached and uncached tokens, so cache throughput needs its own metric.
- **Routing.** The llm-d endpoint picker (EPP) scores pods on queue depth, KV-cache usage and prefix-cache availability, and sends each request to the pod with the best mix of low load and cache hit.
- **Demo.** The first request with a new system prompt took about 3 seconds. A second request with the same system prompt took about 1 second on the same pod. A changed system prompt went back to about 3 seconds.
- **Prefill/decode split.** Prefill is compute-heavy and bursty, and decode is memory-bandwidth-bound and latency-sensitive. On one pod a long prefill stalls decoding and causes streaming jitter. Separating them lets each scale on its own.
- **Measured result.** On GPT-OSS 120B with 16 H100s, the P99 inter-token latency was about 900 ms in the baseline and about 100 ms with PD, almost nine times lower and more stable. The workload had a 10,000-token prefix and 128 tokens per turn.
- **When PD helps.** The speakers' matrix says PD helps with long contexts, a high input/output ratio, large models needing complex parallelism, and a strict inter-token latency target. It needs RDMA or RoCE for KV transfer. Short context or no fast network points to the aggregated setup.
- **GLM case on H200.** A prefill pool of up to three throughput-tuned workers and a single low-latency decode worker, with KV moved over the fabric. Each worker group used TP1, DP8 and EP8. The speakers report about 4x faster time to first token and 60% more queries with 2 prefill and 1 decode workers on this dataset. They also observed BF16 KV cache running faster than FP16 for longer prefills.

## Actionable Takeaways
1. Route agent traffic by cache locality and load together, not load alone, and track cache throughput as its own metric.
2. Keep the system prompt and tool definitions identical across requests to preserve cache hits.
3. Start with aggregated serving. Move to PD only when context, input/output ratio and latency targets justify it and the network supports RDMA or RoCE.
4. When you scale PD, tune the prefill-to-decode ratio and the parallelism per pool separately, and let the autoscaler adjust the ratio as traffic changes.
5. Benchmark with trace replay and distributions (P90 and P99), not averages.

## Notable Quotes
> "Placing decoding tasks on the same GPU creates a phenomenon called phase interference." — Ashish Kamra

> "a tenfold difference in your token balance has a pretty serious impact on your business." — Yuchen Fama

---

*Related: `@content/youtube/aie/your-self-hosted-llm-needs-to-say-no-harshul-jain-parv-khatri-audible-sap` · `@content/youtube/sequoia/memory-and-continual-learning-engrams-dan-biderman-and-jessy-lin` · `@content/youtube/aie/2026-11-15-where-is-all-the-automation`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*