Technical Deep Dive · AI Infrastructure

Inside the Production AI Inference Stack, From vLLM to GPU Load Balancing

Serving one model on one GPU is a solved problem. Serving hundreds of models across thousands of GPUs, with predictable latency, is the infrastructure discipline now forming around vLLM, llm-d, and Kubernetes — and it changes what "infrastructure" even means.

For a long time, the infrastructure question under any AI workload was simple: how many GPUs do we have? That question made sense when one model fit on one node. It stops making sense the moment a fleet is running dozens of models, thousands of concurrent requests, and a latency budget measured in milliseconds — because at that point, the GPU count tells you almost nothing about what the fleet can actually deliver.

A new stack has formed to answer the better question — how much useful inference can we extract from every GPU — and it has its own components, its own vocabulary, and its own failure modes. Here's how it fits together, from the application down to the silicon.

In this article
  1. The stack — eight layers between an application and a GPU.
  2. Why vLLM — the engine every layer above it depends on.
  3. When one node isn't enough — where distributed inference begins.
  4. llm-d — LLM-aware distributed serving for Kubernetes.
  5. Prefill vs. decode — the split that changes everything.
  6. The routing problem — why round-robin fails for LLM traffic.
  7. Five routing mechanisms — cache-aware, disaggregated, speculative, batching-aware and hybrid.
  8. Tooling — where the mechanisms show up in production.
  9. New metrics — what replaces CPU and RAM.
  10. The next stack — where this fits in infrastructure history.
  11. The takeaway

01 · Architecture

The stack

A single inference request passes through eight distinct layers before a token comes back — each one solving a problem the layer below it can't solve on its own.

AI Applications agents, chat UIs, batch pipelines Inference Gateway auth, rate limits, model routing entry point llm-d Router prefix-cache-aware, latency-aware request routing Prefill / Decode Workers disaggregated compute-bound vs. memory-bound pools vLLM continuous batching, PagedAttention, tensor parallelism GPU Pools heterogeneous accelerator capacity High-Speed Fabric NVLink / InfiniBand / RDMA interconnect Kubernetes scheduling, autoscaling, lifecycle management
Highlighted layers (llm-d Router, Prefill/Decode Workers) are where distributed-inference-specific logic lives; everything below vLLM is shared with ordinary cloud-native workloads, and everything above it is where an application's request actually enters the stack. Generated tokens stream back up this same path.

02 · Single-Node Engine

Why vLLM

Before a fleet exists, there's a single serving engine, and vLLM has become the default one for a reason: it turns a GPU's raw FLOPs into throughput that a production API can actually rely on. Originating at UC Berkeley's Sky Computing Lab and now maintained by a community that its README puts at over 2,000 contributors, under an Apache-2.0 license, it improves model serving through six capabilities that matter well beyond a single node:

  • 01Continuous batching — new requests join a running batch as soon as a GPU slot frees up, instead of waiting for the whole batch to finish, which is what keeps GPU utilization high under bursty traffic.
  • 02PagedAttention — manages the KV cache in fixed-size pages, the way an OS manages virtual memory, instead of one contiguous block per request — which is what makes memory-efficient, high-concurrency serving possible at all.
  • 03KV-cache management — reuses and evicts cached attention state intelligently, so a shared system prompt or a multi-turn conversation doesn't recompute what it already computed.
  • 04Tensor parallelism — splits a single model's weights and computation across multiple GPUs, for models too large to fit in one accelerator's memory.
  • 05OpenAI-compatible APIs — serves an endpoint that drops into existing client code and tooling built against that API shape, with no rewrite required.
  • 06High-throughput inference — the combined effect of the five techniques above: more tokens per second, per GPU, than a naive serving loop achieves.

03 · Where It Breaks

When one node isn't enough

Everything in that list is a single-node, or single-model-across-a-few-GPUs, concern. It's a different problem once an organization is operating tens, hundreds, or thousands of GPUs at once: which of dozens of models should handle this request, which replica has this request's system prompt already cached, what happens when a node fails mid-generation, and how does the fleet scale a specific model up in the ninety seconds before a traffic spike turns into dropped requests.

None of that is a serving-engine problem anymore. It's a distributed-systems problem — and it's exactly the problem Kubernetes was built to solve for stateless microservices, except LLM inference is neither stateless (the KV cache is state, and it's expensive to rebuild) nor uniform (a 200-token chat reply and a 4,000-token document summary cost wildly different amounts of compute). That mismatch is what llm-d exists to close.

04 · Fleet Coordination

llm-d: LLM-aware distributed serving for Kubernetes

llm-d is an open-source, Kubernetes-native project — a CNCF Sandbox project (joined in March 2026) founded by Red Hat, Google Cloud, IBM Research, CoreWeave and NVIDIA — built on the observation that the disaggregation and KV-cache techniques behind the fastest inference systems (the kind DeepSeek and similar teams built in-house) were out of reach for most ML platform teams, simply because building and operating them from scratch is its own multi-year engineering project. llm-d packages those techniques as Kubernetes-native primitives instead, running vLLM (and other engines) across the cluster rather than replacing it. It brings LLM-aware distributed serving concepts to Kubernetes, including:

  • 🔐Intelligent request routing — sends each request to the replica best positioned to serve it, not just the least-busy one.
  • 🔐Prefix-cache-aware scheduling — routes a request to a replica that already has its shared prompt prefix cached, avoiding redundant computation across the fleet.
  • 🔐Prefill/Decode disaggregation — runs the two phases of generation on independently sized, independently optimized worker pools (more on this below).
  • 🔐Expert parallelism for MoE — distributes a mixture-of-experts model's experts across the fleet, so only the parameters a token actually needs are activated and transferred.
  • 🔐Autoscaling — grows and shrinks each worker pool independently, based on the signals that actually predict inference load, not generic CPU utilization.
  • 🔐Distributed KV-cache strategies — extends cache reuse beyond a single node, across a tiered cache that spans GPU memory, host memory, and fast local storage.

05 · The Core Split

Prefill vs. decode: the split that changes everything

Generating a response happens in two phases with almost opposite hardware profiles, and treating them as one workload is where a lot of wasted GPU capacity hides.

Prefill

Process the prompt→compute intensive→build KV cache

Decode

Generate output tokens→memory / bandwidth sensitive

Prefill reads the whole prompt at once and can saturate a GPU's compute with large matrix multiplies — it's a job that benefits from batching several prompts together. Decode generates one token at a time, and each step is bottlenecked by how fast the GPU can read the growing KV cache from memory, not by how many FLOPs it has — it benefits from more replicas and more memory bandwidth, not more raw compute.

Run both phases on the same worker pool, and a long prefill (a big document, a long system prompt) will stall the in-flight decode steps of every other request sharing that GPU — a form of head-of-line blocking that shows up to users as a sudden latency spike with no obvious cause. Disaggregating the two phases onto separate, independently scaled pools — a prefill pool sized for burst compute, a decode pool sized for sustained memory bandwidth — removes that interference and lets each phase scale against the metric that actually constrains it.

06 · The Routing Problem

Why naive load balancing fails for LLMs

In traditional microservices, most requests consume roughly the same CPU cycles, so round-robin routing works fine. LLM inference breaks that assumption: two requests hitting the same endpoint can have wildly different costs, and a purely round-robin router will happily stack all the expensive ones on a single GPU while others sit idle.

Request A
~10 tokens
A short completion returns in well under a second and frees its GPU slot almost immediately.
Request B
~2,000 tokens
A long generation can hold GPU memory and compute for 15+ seconds, blocking capacity the whole time.

Route both of these purely round-robin and one GPU ends up saturated with long-running generations while a neighbor sits underutilized. Modern routers instead reason about token-level cost, memory state, and pipeline stage — not just "which server is next in line."

Before the LLM-specific mechanisms, it's worth naming the generic load-balancing algorithms every inference router still builds on — and exactly where each one runs out of road for token-generation workloads.

AlgorithmHow it decidesCache-awareness
Round robinCycles through workers sequentiallyCache-blind
RandomPicks a worker at randomCache-blind
Least-connections / least-loadedSends to the worker with fewest active requestsLoad-aware, cache-blind
Direct / sticky routingPins a session to a known worker (e.g., by client IP)Cache-friendly, doesn't rebalance

With N identical replicas, round robin gives roughly a 1-in-N chance that a request lands on the GPU that already has its context cached. That's the gap the mechanisms below close.

07 · LLM-Native Mechanisms

Five ways production clusters route around token cost

Every major inference stack — vLLM, TensorRT-LLM, SGLang, NVIDIA Dynamo, llm-d — builds on some combination of the five mechanisms below.

01

Prefix Caching / KV-Cache-Aware Routing

Every LLM request passes through a prefill phase (processing the prompt into key-value tensors) and a decode phase (generating tokens one at a time from that cache). If 100 users share the same system prompt or few-shot context, routing all of them to the replica that already holds that prefix in VRAM skips redundant prefill work entirely — vendor benchmarks report this can eliminate the large majority of repeated prefill computation for high-overlap workloads.

In practice, prefix-aware routing is implemented a few different ways: session affinity by client identity, consistent hashing of the prompt prefix so identical prefixes land on the same replica, an approximate cache map maintained by the router, or — as in llm-d — precise cache metadata streamed from the inference engines themselves (vLLM and SGLang both emit KV-cache events the router can subscribe to). Good routers also track cache occupancy, not just hit probability: a replica whose cache is nearly full may evict useful blocks under pressure, so it can be worth accepting a smaller cache hit on a replica with more headroom.

Prefix hashKV-cache occupancySession affinityCache event streaming
02

Disaggregated Prefill and Decode (Chunked Routing)

Prefill and decode have opposite hardware profiles: prefill is compute-bound (it wants raw FLOPS to digest the prompt fast), while decode is memory-bandwidth-bound (it wants to stream one token at a time as fast as VRAM can be read). Running both on the same GPU pool forces a compromise. Modern inference engines instead split the cluster into dedicated prefill workers and decode workers, each provisioned and scaled for its own bottleneck, with a router/transfer layer moving the computed KV cache from the prefill worker to the decode worker that continues the generation.

Because that KV-cache handoff is itself bandwidth-sensitive, disaggregated deployments generally place paired prefill/decode workers close together on the network — often within the same rack over NVLink or another high-bandwidth interconnect — to keep the transfer from becoming its own bottleneck.

Client requestenters router
→
Prefill workerscompute-bound
↓ KV cache transfer
Decode workersbandwidth-bound
→
Streamed tokensback to client
Compute vs. bandwidth profileKV-cache transfer costTopology-aware placement
03

Speculative-Decoding-Aware Routing

Speculative decoding pairs a small, fast draft model that proposes several candidate tokens at once with a larger target model that verifies them in a single parallel pass — accepting the draft tokens that match and falling back to normal generation the moment one doesn't. Because the draft and target models have very different resource profiles, some deployments route them to different hardware tiers entirely: lightweight draft inference on smaller or edge-adjacent GPUs, with verification against the full model concentrated on centralized, high-memory GPU clusters.

This is a newer, more specialized pattern than the other four mechanisms here — most teams still run draft and target together on the same replica — but it's an active area of 2026 inference-engine development as clusters look for ways to cut Time-To-First-Token without over-provisioning the largest GPUs for every request.

Draft/target splitAcceptance rateHardware tiering
04

Dynamic Continuous-Batching-Aware Load Balancing

Inside a single GPU, continuous (iteration-level) batching — the technique behind vLLM and TensorRT-LLM's throughput gains — refills a finished sequence's batch slot with a new request at the next decoding step instead of waiting for the whole batch to complete. That maximizes GPU occupancy locally. The same signal is valuable one layer up: routers that monitor each replica's active batch-slot utilization can send new requests to whichever GPU has real spare decode capacity right now, rather than one that merely has the lowest connection count.

This matters because "least connections" and "batch slots actually free" frequently disagree — a replica can show few open connections while its batch is still saturated with long-running generations, or vice versa.

Batch-slot occupancyIteration-level schedulingReal-time GPU saturation
05

Multi-Signal Hybrid Scoring Routers

In production, these mechanisms aren't used in isolation — they're combined into a single scoring function per candidate GPU. A modern inference router (the pattern used by NVIDIA Dynamo, llm-d's Gateway API Inference Extension, and SGLang's router) typically blends: prefix/KV-cache hit probability, current cache memory pressure, queue depth, active decode-batch load, worker role (prefill vs. decode), LoRA-adapter availability if the deployment serves multiple fine-tunes, and request priority or SLA class — then routes to whichever replica scores best across all of them, not just one.

Weighted multi-factor scoringSLA / priority classLoRA adapter affinity

08 · Tooling

Where these mechanisms show up in production

A quick map of the frameworks and routers that implement the mechanisms above.

ProjectLayerPrimary routing signal(s)
vLLMInference enginePagedAttention KV-cache management; continuous batching; emits cache events consumable by external routers
NVIDIA TensorRT-LLMInference engineDisaggregated prefill/decode serving; in-flight batching; speculative decoding support
NVIDIA DynamoInference orchestration OSKV-cache-aware routing, disaggregated serving, GPU autoscaling across multi-node clusters
llm-d (Kubernetes)Router / Gateway API extensionPrecise KV-cache event tracking, prefix-aware and load-aware scoring, prefill/decode-aware routing
SGLangInference engine + routerRadixAttention prefix caching; cache-aware load balancer across replicas
Ray ServeServing / autoscaling layerReplica-level autoscaling and request routing for model deployments, including LLM serving graphs

Mechanism descriptions are synthesised from public engineering documentation for vLLM, NVIDIA TensorRT-LLM and Dynamo, llm-d and SGLang. Verify current implementation details against each project's docs before architecting a production system.

Release data from GitHub on 23 October 2026: vLLM v0.32.0 (18 October), SGLang v0.5.22 (19 October), NVIDIA Dynamo v1.6.0 (22 October), llm-d v1.0.0 (20 October) and TensorRT-LLM v1.2.1 (20 April 2026). Dynamo's README lists KV-aware routing, disaggregated serving and an SLA-based planner, and describes Dynamo as an orchestration layer above vLLM, SGLang and TensorRT-LLM.

09 · A New Vocabulary

New metrics for a new kind of infrastructure

Traditional infrastructure capacity planning revolved around four resources everyone already had intuitions about. AI infrastructure keeps those and adds a second set that most infrastructure teams have never had to reason about before:

Traditional infrastructure

  • CPU
  • RAM
  • Storage
  • Network

AI infrastructure adds

  • GPU
  • Model Weights
  • KV Cache
  • Tokens / sec
  • TTFT
  • Inter-token Latency

TTFT (time-to-first-token) is the delay between a request arriving and the first generated token coming back — dominated by the prefill phase, and the number a user actually feels as "how fast did it start responding." Inter-token latency is the gap between each subsequent token — dominated by decode, and the number that determines how fast the rest of the response streams in. Neither shows up in a CPU/RAM dashboard, and neither correlates cleanly with raw GPU count.

That's the actual shift: the question stops being "how many GPUs do we have?" and becomes "how much useful inference can we extract from every GPU?" — a question about goodput (throughput that actually meets a latency target), not just throughput.

In 2026, efficient AI engineering is not just about model weights — it's about how well the serving layer schedules work across GPUs. Three metrics dominate that conversation:

KV-Cache Hit Rate

How often a request lands on a replica that already holds relevant context — the single biggest lever on redundant prefill cost.

Prefill vs. Decode Scheduling

Whether compute-bound and bandwidth-bound work are separated onto hardware suited to each, and how efficiently the KV cache moves between them.

Time-To-First-Token (TTFT)

Latency from request arrival to the first generated token — dominated by prefill and queueing time.

Inter-Token Latency (ITL)

Latency between successive tokens during decode — dominated by memory bandwidth and batch saturation.

10 · Where This Fits

The stack that's replacing the last decade's stack

This isn't the first time infrastructure has re-organized itself around a new abstraction layer. The last decade's progression abstracted compute, then packaging, then orchestration, then the application boundary itself:

Last decade
VMs→ Containers→ Kubernetes→ Microservices
Emerging now
GPUs→ Model Servers→ Distributed Inference→ AI Agents

Kubernetes was the abstraction that let a microservices architecture exist without every team reimplementing scheduling and failover by hand. llm-d is aiming at the same role one layer up: the abstraction that lets an agent architecture exist without every team reimplementing prefix-cache routing and prefill/decode disaggregation by hand.

11 · Summary

The takeaway

GPU runs the model.

vLLM serves the model.

llm-d coordinates the fleet.

Kubernetes operates the platform.

AI isn't eliminating infrastructure engineering. It's creating a new infrastructure discipline — one measured in tokens per second and milliseconds to first token, not just GPU count.