⚡Flashcard Drill➔
L2S1 · ROI & FeasibilityS5 · Eval & LLMOpsS6 · Security & FinOpsVerified: 2026-11-30

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_benchmark

Eliminating 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

Step 1: Prefix-Affinity Gateway & Per-Tenant Token Rate Limiter

Route incoming prompts via prefix-aware consistent hashing (bounded by replica queue load) while enforcing per-tenant token quotas.

Step 2: Compute-Optimal Prefill -> Zero-Copy RDMA KV Handoff -> Decode Pool

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

Disaggregated Prefill + Decode Pools (RDMA Interconnect)
When to Use: High-concurrency long-prompt workloads with strict TPOT SLA over high-bandwidth RDMA fabrics.
Trade-Off: Completely isolates compute vs memory-bandwidth contention; requires fast RDMA interconnects and two-pool orchestration.
Co-Located Chunked Prefill + PagedAttention
When to Use: Single-node or Ethernet-only clusters serving short-to-medium prompt traffic.
Trade-Off: Zero network KV transfer overhead and simpler ops, at the cost of mild ITL jitter during long-prompt spikes.

📊 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

  1. 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)?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔

Bidirectional Taxonomy Links

[L3] vLLM Speculative Decoding & Radix Prefix Cache Serving Benchmark (Project)[HubB] Role Lens · AI Inference & Kernel Optimization Engineer[HubB] Role Lens · AI Research Scientist (Post-Training & Eval)[L0 Card] vLLM PagedAttention & Continuous Batching[L0 Card] Prompt Caching & RadixAttention[L0] vLLM PagedAttention & Continuous Batching Serving Engine[L0] SGLang RadixAttention Automatic Prefix Caching & Constrained Serving[L0] Confidence-Based Cascading Model Router & Pareto FinOps Primitive[L0] LLM Token FinOps, Prefix Caching & Tenant-Isolated Semantic Cache Gateway[L1] Stage 6 · KV-Prefix Alignment & Prompt Caching Inference FinOps Pattern[L1] Stage 6 · Per-Tenant Token Quota Rate-Limiter & Graceful Circuit-Breaker Pattern[L1] Stage 6 · Semantic Caching & Tiered Cascading Model Routing FinOps Pattern

Internal Tools & Primary Sources