L2 System Design · Distributed Prefill-Decode Disaggregated LLM Serving Blueprint
Principal AI Infra System Design blueprint solving prefill-decode interference in high-concurrency long-context serving via disaggregated P/D GPU pools, RDMA KV-cache transfer, radix prefix-aware routing, and SLO-aware autoscaling.
Best For
AI Infra / Inference Engineer interviews covering P/D disaggregation, KV-cache networking, and GPU goodput optimization.
Human-AI Boundary
Gateway automates prefix routing, queue shedding, and small-model fallback; infra engineers govern capacity caps, SLO tiers, and canary rollouts.
Anti-Patterns to Avoid
- Co-locating 32k-token prefill bursts and latency-sensitive decode batches on the same replica without chunked-prefill or P/D isolation, causing severe ITL spikes
- Using blind round-robin load balancing across LLM replicas, thrashing Radix/Prefix KV caches down to <5% hit rate
Latency/Cost Profile & Eval Metrics
TTFT <= 350ms (8k prompt on Prefill pool); Inter-Token Latency (TPOT) <= 25ms P99 on Decode pool · H100/B200 GPU-hours + InfiniBand/RoCEv2 KV transfer overhead (offset by 3x higher decode batch utilization)
- SLO-Compliant Goodput (Tokens/s/GPU meeting TTFT & TPOT): TTFT P99 < 400ms & TPOT P99 < 30ms at >= 75% GPU HBM KV utilization (Benchmark under mixed realistic length distributions (short chat + 32k RAG/coding bursts))
- Prefix Cache Hit Rate & KV Transfer Overhead: KV prefix hit >= 65% on agentic/system-prompt workloads; KV migration < 15% of TTFT (Measure RDMA/NIXL transfer latency across cross-node Decode handoffs)
💰 Business ROI Model & Evidence Level
verified_benchmarkEliminating prefill-decode interference raises SLA-compliant Goodput by 1.5-2.0x and reduces GPU cost per million output tokens by 30-45%.
🏗️ End-to-End Architecture Pipeline
Route incoming prompts via prefix-aware consistent hashing (bounded by replica queue load) while enforcing per-tenant token quotas.
Prefill workers compute prompt KV blocks, stream them via RDMA/NIXL to Decode workers, and let Decode maintain smooth continuous batching.
⚖️ Engineering Trade-Off & Decision Matrix
📊 Benchmark & Alternative Comparison
- P/D Disaggregation vs Monolithic Continuous Batching (32k input / 512 output mix): cuts P99 TPOT jitter by ~3.2x at 2x concurrency.
🚨 Production Failure Modes & Signatures
- Hot-prefix thundering herd overloading one Prefill replica if consistent hashing lacks bounded load shedding
- KV cache transfer backpressure stalling Prefill HBM reclamation when Decode pool saturates
🛡️ Compliance & Governance Hard Constraints
- Strict tenant isolation on shared Radix/Paged KV memory blocks (zero cross-tenant KV cache reuse unless explicitly public system prefix)
- Cryptographic zeroing/invalidation of freed KV memory blocks in regulated multi-tenant clusters
🎤 Interview Defense & System Design Deep-Dive Q&A
- When does Prefill-Decode disaggregation actually perform WORSE than Chunked Prefill on the same node (hint: compute KV-transfer time vs prompt length over Ethernet vs InfiniBand)?
Bidirectional Taxonomy Links
Internal Tools & Primary Sources
- DistServe — Disaggregating Prefill and Decoding for Goodput-Optimized LLM Serving (OSDI '24) (paper, 2026-11-30)
- vLLM PagedAttention & Disaggregated Prefill Architecture Docs (official_docs, 2026-11-30)