Skip to main content
Intermediate8 min read44 of 59

LLM Serving Stack Glossary: Engines, Caches, Routing, and Metrics

A practical glossary for the LLM serving stack: vLLM, SGLang, TensorRT-LLM, llama.cpp, KV cache, routing, autoscaling, and observability.

LLM Serving Stack Glossary: Engines, Caches, Routing, and Metrics

[Definition] An LLM serving stack is the set of components that load a model, schedule token work, manage KV cache memory, route requests, scale replicas, and expose the latency and quality signals needed to operate the service.

The stack in one picture

text
Client / application
  ↓
API gateway + authentication + rate limits
  ↓
Router / queue / admission policy
  ↓
Serving engine (vLLM, SGLang, TensorRT-LLM, llama.cpp)
  ↓
GPU or accelerator + model weights + KV cache
  ↓
Metrics, traces, logs, autoscaler

Engines

TermWhat it doesGood fit
vLLMhigh-throughput serving with PagedAttention and continuous batchinggeneral GPU serving baseline
SGLangserving/runtime focused on structured generation and shared-prefix workloadsagentic and repeated-prefix applications
TensorRT-LLMNVIDIA-optimized compilation and kernelsmaximum NVIDIA-specific performance effort
llama.cppGGUF-oriented local/CPU/edge inferencelaptop, edge, constrained environments
TGItext-generation serving engineHugging Face ecosystem deployments
Ollamalocal model lifecycle and developer conveniencelocal experimentation

Choose an engine based on hardware, model support, observability, deployment constraints, and workload shape—not a benchmark headline alone.

Memory and scheduling terms

TermMeaning
prefillprocessing the input prompt to create initial KV cache
decodegenerating one output token per active sequence iteration
KV cachestored key/value attention states for past tokens
PagedAttentionblock-based KV-cache management that limits fragmentation
prefix cachingreusing cached KV blocks for identical prompt prefixes
continuous batchingadd/remove requests between decode iterations
chunked prefillsplit a long prompt across scheduler steps to protect decode latency
preemptionpause/recompute work when the scheduler overcommits cache capacity
max_num_seqscap on active sequences; an engine configuration, not a universal default
max_num_batched_tokenstoken budget available to a scheduler iteration

Routing and scale terms

TermMeaning
admission controlpolicy deciding whether a request joins, waits, sheds, or routes elsewhere
request queuerequests waiting for a replica/scheduler slot
replicaindependent serving process with its own model and cache
tensor parallelismsplit model tensors across accelerators to fit or accelerate the model
pipeline parallelismplace model layers across accelerators/stages
autoscalingchange replica count from demand/queue/metric signals
warm poolreplicas kept ready to avoid cold-start TTFT

Observability terms

Track these separately:

  • TTFT: time to first token;
  • TPOT / ITL: time per output token;
  • E2E latency: full request duration;
  • queue time: waiting before execution;
  • GPU/KV cache occupancy: cache saturation risk;
  • preemption count: scheduler overcommit signal;
  • prefix-cache hit rate: shared prompt reuse value;
  • tokens/sec: aggregate work rate, not a user-latency substitute;
  • cost per successful answer: ties serving efficiency to product value.

The Ramu-DE/vLLM workshop wires Prometheus metrics, KEDA scaling, and p50/p95/p99 tracing. Its queue thresholds and one-to-four replica settings are workshop examples; use them as a starting hypothesis only.

Platform layers

LayerRole
Triton Inference Servermulti-model serving and metrics integration
NVIDIA NIMpackaged, managed inference microservices
Kubernetes/KEDAreplica scheduling and metric-driven scaling
Dynamo-style planner/routerSLO-aware routing and prefill/decode pool decisions
OpenTelemetry/Langfuse/CloudWatchtraces, token use, request outcomes, and latency analysis

Free concepts, Pro architecture

The glossary is public so architecture conversations use the same language. The Pro serving path selects an engine, maps the request flow, defines the metrics, writes admission rules, and ties autoscaling to an SLO. A Live Cohort capstone reviews the architecture and failure modes.