WhoBuilt

KV Cache-Aware Routing and P/D Disaggregation on Kubernetes

Aug 27, 2026· 22 min· 5.1K views·Watch on YouTube

Speakers

Ashish Kamra, senior manager of performance engineering, and Yuchen Fama, product manager at Red Hat Inference, explain KV cache-aware routing and prefill/decode disaggregation for agentic inference on Kubernetes at an AI Engineer conference session.

Agentic workloads change serving priorities

Yuchen says agent sessions can span a few turns to 3,000, reuse system prompts and tool definitions with cache hit rates often above 90%, and have input-to-output ratios above 100:1. Their variable context lengths make averages insufficient for capacity planning, so teams need distributions and P90 measurements. He describes a shift toward interactive latency and coordination between inference engines, schedulers, and routers.

Route requests to reuse KV cache

LLM-D's endpoint picker plugins score pods using running and waiting requests, KV cache use, and prefix availability to favor low-load pods likely to have a cache hit. In Yuchen's demo, a repeated system prompt keeps the request on the same pod and reduces processing time from about three seconds to about one. He also describes work on cache offloading and session-aware eviction, including session pinning.

Separate prefill and decode when workloads fit

Yuchen explains that prefill builds the prompt's KV cache and favors compute and batching, while decode generates tokens one at a time and is sensitive to memory bandwidth and latency. When both phases share a pod, a long prefill can stall ongoing token generation. In LLM-D, a prefill worker creates the cache and transfer metadata, then a decode worker retrieves the cache over the network.

Benchmark the trade-offs

In Red Hat's GPT-OSS 12B tests on 16 H100s, P/D reduced P99 inter-token latency from roughly 900 milliseconds to 100 milliseconds in one comparison. Another test found P/D most beneficial in the middle concurrency range, while KV cache-aware routing also improved the aggregated baseline. Ashish recommends considering P/D for long, prefill-heavy contexts and strict streaming latency, with high-speed networking such as RDMA or RoCE; aggregated serving may fit short contexts, low concurrency, or strict time-to-first-token targets.

Apply the design to GLM-5.2

Yuchen describes ongoing work serving GLM-5.2 on H200 clusters, combining KV cache routing, P/D, and parallelism strategies. Their design uses up to three prefill workers for throughput and one decode worker for low latency, with NIXL transferring KV cache; adding prefill workers can increase throughput without reconfiguring decode. On a workload with a 45:1 input-to-output ratio, the team reports four times faster time to first token and 60% more requests with two prefill workers and one decode worker.

Takeaways

  • Measure agent workloads by context-length distributions and tail percentiles, not averages alone.
  • Prefix routing can reduce repeated-prompt latency by keeping requests near reusable KV cache.
  • Separate prefill from decode when long prompts interfere with streaming latency and the network can handle KV transfers.
  • Benchmark routing and P/D at multiple concurrency levels; the gains can vary with load.
  • Scale prefill and decode pools independently when their workload demands differ.

Mentioned in this talk

Search inside this talk

What was claimed 11

  • works at
    Senior Manager, AI Performance
    “I’m a senior manager of performance engineering at Red Hat.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Senior Principal Product Manager, Inference
    “I’m the product manager at Red Hat Inference”
    YouTube
    Verified2 sources· Talk, Web· archived
  • built
    “we’ve also incubated GuideLLM for benchmarking”
    YouTube
    Unverified1 source· Talk
  • metric
    Anthropic: Cached and uncached tokens have a 10x API pricing difference
    “There is a 10x cost difference between cached and uncached tokens”
    YouTube
    Unverified1 source· Talk
  • uses
    LLM-D uses vLLM
    “probes each pod's vLLM pod metrics”
    YouTube
    Unverified1 source· Talk
  • feature
    LLM-D: Endpoint picker plugins route requests based on KV cache locality and pod load
    “route requests to the optimal pods based on KV cache locality and load”
    YouTube
    Unverified1 source· Talk
  • feature
    LLM-D: Hosts workload APIs including LeaderWorkerSet and DisaggregatedSet for multi-node model execution
    “workload APIs, such as LeaderWorkerSet and DisaggregatedSet, that orchestrate complex multi-node model execution”
    YouTube
    Unverified1 source· Talk
  • feature
    Red Hat: high-performance, Kubernetes-native distributed LLM inference framework
    high-performance, Kubernetes-native distributed LLM inference framework
    “LLM-D is a high-performance, Kubernetes-native distributed LLM inference framework”
    YouTube
    Unverified1 source· Talk
Show all 11 facts

Related talks