Before you start: words you need#
| Word | Plain meaning |
|---|---|
| Serving stack | Everything between a client and the GPU: engine, server or router, autoscaling, monitoring. |
| SLO | Service-level objective: a target such as “p95 time to first token under 800 ms” (23.a). |
| p95 | The 95th percentile: 95% of requests are at least this fast. |
| TTFT / ITL | Time to first token; inter-token latency, the gap between streamed tokens (2.c). |
| Cost per million tokens | What you pay in GPU time to produce one million output tokens at your operating point (23.c). |
| Operating point | The load you actually run at, set by your latency target, not the engine’s maximum. |
| Maintenance trajectory | Whether a project is getting more or less active: release cadence, contributors, who funds it. |
1. What is it?#
The decision of which engine (and, at scale, which layer above it) will serve your models, made in a way you can defend and later revisit.
The honest headline: for most teams, most of the time, the choice of engine matters less than how well you tune whatever you choose. A well-tuned vLLM beats a badly tuned TensorRT-LLM by more than TensorRT-LLM beats vLLM when both are tuned. There are still real distinctions, and this lesson shows how to make the choice on evidence.
Facts checked on 12 November 2026.
2. Why does it matter?#
The engine you choose sets which models you can run next month, which hardware you can buy next year, which features (structured output, multi-LoRA, disaggregation) are a flag away and which are a project, and what your on-call engineers have to understand at 3 a.m. Getting it badly wrong costs a migration; getting it slightly wrong costs a few percent of GPU spend. Knowing which kind of wrong you are risking is most of the skill.
3. Simple analogy#
Choosing an engine is like choosing a car for a delivery business. The fastest car on a test track is rarely the right answer. You ask: does it carry my loads (models), can my mechanics service it (operations), are parts still being made (maintenance), does it fit my roads (hardware), and what does it cost per delivery at the speed limit I actually drive at (cost per token at your SLO)?
4. Tiny example: a one-paragraph decision#
A made-up but realistic decision record:
We serve one open MoE model to our product, about 40 requests per second, prompts of 2–6k tokens with a shared 3k system prompt, on 16 H200 GPUs. Requirement: p95 TTFT under 1 s, p95 ITL under 50 ms. We benchmarked vLLM v0.32.0 and SGLang v0.5.23, both tuned, on a replay of one week of real traffic. Both met the SLO; SGLang had 6% lower cost per million tokens, vLLM had support for the next model we plan to adopt on day one. We chose vLLM, with prefix-aware routing, and will re-run the benchmark when we change model or GPU.
Notice what is in it: the workload, the SLO, versions, a tuned comparison on real traffic, the deciding criterion, and the condition for revisiting. That is a defensible decision.
5. Technical explanation: the decision tree#
START
├─ Do you serve models other than LLMs (embeddings, vision, rankers, classifiers)
│ from the same platform?
│ └─ YES → TRITON as the model server, with a backend per model
│ (vllm or tensorrtllm for LLMs, onnxruntime or tensorrt for small models),
│ or separate services per model type, which is often simpler.
│
├─ Is your fleet not NVIDIA (AMD, Intel Gaudi, AWS Trainium/Inferentia, TPU)?
│ ├─ AMD → vLLM or SGLang (both support ROCm); verify your model
│ ├─ AWS chips → vLLM with the Neuron plugin, or the Neuron SDK
│ ├─ TPU → vLLM's TPU backend, or JAX-based serving (7.i)
│ └─ Gaudi, others → vLLM's hardware plugins (19.f)
│
├─ Is your workload dominated by SHARED PREFIXES?
│ (agent loops, few-shot, multi-sample, document QA, tree search)
│ └─ YES → evaluate SGLang closely (15.b), and vLLM with prefix caching.
│
├─ One or two stable models, very high volume, NVIDIA only,
│ newest GPUs, and 10-20% is worth operational effort?
│ └─ YES → evaluate TENSORRT-LLM (15.c), usually under Dynamo.
│
├─ Are you running TGI today?
│ └─ Archived in March 2026. Plan a migration to vLLM or SGLang (section 8).
│
├─ One user, one machine?
│ └─ llama.cpp, Ollama, LM Studio or MLX (15.e).
│
└─ Otherwise (the common case)
└─ VLLM. Broadest model and hardware support, simple deployment, strong
performance, largest community. The correct default.“vLLM unless you have a specific reason” is a defensible position, and the one most teams should take.
The layer above the engine#
The tree picks an engine. Once you run more than a handful of replicas you also need a layer that routes, scales and shares KV cache across them. The open-source options on 12 November 2026 (21.j compares them in depth):
llm-d Kubernetes-native distributed inference; v1.0.0 on 20 Oct 2026.
Cache- and load-aware routing through the Gateway API Inference
Extension, P/D disaggregation, multi-tenant flow control.
NVIDIA Dynamo v1.6.2 (5 Nov 2026). Router, planner, KV block manager and P/D
disaggregation over vLLM, SGLang or TensorRT-LLM.
SGLang Model Gateway Rust router and control plane for SGLang fleets (15.b).
vLLM production-stack Helm-based reference deployment with a router; AIBrix, a
and AIBrix control plane for vLLM fleets.
KServe, Ray Serve General model-serving platforms that host LLM engines.Choose the engine first; add one of these when routing and autoscaling become the problem (Module 21). They are not alternatives to the engine.
6. Under the hood: the evaluation you should actually run#
Do not choose on published benchmarks. Run this:
1. DEFINE YOUR WORKLOAD
- prompt length distribution (p50, p95, p99) from real traffic
- output length distribution
- arrival pattern (rate, burstiness)
- prefix sharing rate
- required features (structured output, multi-LoRA, long context, tool calling)
2. DEFINE YOUR SLOs
- p95 TTFT, p95 ITL, availability
3. BUILD ONE BENCHMARK HARNESS that works against any OpenAI-compatible endpoint.
Replay your real length distribution and arrival pattern.
(`vllm bench serve` and SGLang's bench_serving both work against other engines.)
4. FOR EACH CANDIDATE
a. deploy it (record how long this took: it is data)
b. tune it (19.d for vLLM; the same ideas apply elsewhere)
c. measure throughput at your SLO, cost per million tokens, p95/p99 TTFT and ITL,
and the maximum sustainable arrival rate
d. check output quality against your reference evaluation
e. note operational friction: configuration size, docs, failure modes, metrics
5. COMPARE ON COST PER MILLION TOKENS AT YOUR SLO
not on peak throughput, not on batch-1 latency.Steps 4a and 4e are real criteria. A system that is 15% faster and takes three engineer-weeks a quarter to operate is not obviously better.
The criteria, weighted#
CRITERION WEIGHT WHY
Model support (yours, now) HIGH if it does not run your model, nothing else matters
Cost per M tokens at SLO HIGH the actual objective
Feature coverage HIGH structured output, LoRA, long context: do you need them?
Operational simplicity HIGH you will live with this for years
Maintenance trajectory HIGH an engine that stops moving becomes a migration
Community and support MEDIUM how fast do bugs and security issues get fixed?
Peak throughput MEDIUM only matters at your operating point
Batch-1 latency VARIES critical for some products, irrelevant for others
Hardware flexibility VARIES matters if your fleet is mixed or may changeModel support is the top criterion and the one most often overlooked. All three major engines now advertise day-0 support for big releases on NVIDIA hardware, but support for the long tail of models, and for non-NVIDIA hardware, still differs. If your plan is to adopt new models quickly, check how the last five models you cared about landed in each engine.
Maintenance trajectory joined this list the hard way: TGI was a reasonable recommendation in this material until Hugging Face archived it in March 2026.
7. Performance implications: common situations and answers#
"We're a startup serving one open model to our product."
→ vLLM. Deploy in an afternoon, tune in a day, revisit in a year.
"We serve 40 fine-tunes of one base model."
→ vLLM (or SGLang) with multi-LoRA (18.g, 20.i). One base model in memory
instead of 40 copies.
"We run an agent platform with long tool-definition prefixes."
→ Evaluate SGLang with its gateway against vLLM with prefix-aware routing.
The prefix hit rate decides it.
"We're an inference provider with one flagship model at massive scale on Blackwell."
→ Evaluate TensorRT-LLM under Dynamo against vLLM and SGLang. At your volume
10% is real money, and you can afford to benchmark properly.
"We serve LLMs, embeddings, rerankers and a vision model."
→ Triton as the model server with a backend per model, or separate services
per model type.
"We're on AMD MI300X or MI355X."
→ vLLM or SGLang on ROCm. Verify your model and features (7.h).
"We need on-device or browser inference."
→ llama.cpp, MLX, ONNX Runtime GenAI, ExecuTorch or WebLLM (15.e).
"We can't decide."
→ vLLM. You can migrate later; the API is compatible.8. Production implications: the migration question#
Because you will reconsider:
WHAT MAKES MIGRATION EASY
✓ every engine speaks the OpenAI-compatible API → clients do not change
✓ your benchmark harness is engine-agnostic
✓ your model artefacts are standard (safetensors + config.json; ModelOpt or
compressed-tensors quantized checkpoints load in several engines)
✓ your metrics are normalised to common names at collection time
WHAT MAKES IT HARD
✗ engine-specific formats (an old TensorRT engine is not portable)
✗ engine-specific features in your product (SGLang's DSL, custom parameters)
✗ tuning knowledge that does not transfer
✗ dashboards and alerts built on one engine's metric names
✗ quiet differences: sampling defaults, chat templates, stop handling,
tokenizer versions, what max_tokens means near the context limitDesign for migration: keep the OpenAI API as your internal contract, keep model artefacts in a standard format, and normalise metric names. Then the choice is reversible, which lowers the stakes. When you do migrate, run both engines side by side on mirrored traffic and compare outputs, not just latency (20.j).
9. Common mistakes#
- Building your own engine. Unless you have a genuinely novel requirement and a team to maintain it, you will spend a year reimplementing continuous batching and paged attention, badly. The legitimate reasons are an architecture nobody supports, hardware nobody targets, or being an inference infrastructure company. Otherwise contribute to an existing engine.
- Choosing on a vendor benchmark. Benchmarks are run by the party that wins them, on workloads that favour them.
- Choosing on peak throughput. Your operating point is throughput under your latency SLO.
- Ignoring operational cost. A year of operating a complex system can cost more than 20% of the GPU spend for a small team.
- Optimising the choice before tuning what you have. The tuning gap usually exceeds the engine gap.
- Ignoring maintenance trajectory. Check release cadence and who funds the project.
10. Hands-on exercise#
- Build the harness. Write (or adopt
vllm bench serve) a benchmark that works against any OpenAI-compatible endpoint, replays a configurable length distribution and arrival pattern, and reports throughput, TTFT/ITL percentiles and cost per million tokens. This is the most reusable artefact in this module. - Evaluate two candidates. Deploy two engines for the same model, tune both, run the harness against each, and write a one-page comparison with a recommendation.
- Measure the tuning gap. For one engine, measure throughput with defaults and after tuning. Compare that gap with the gap between engines. Which is larger?
- Migration test. Point a client built against one engine at another. What broke? Record what made migration hard.
- Write the decision document for your real situation, in the shape of section 4: requirements, candidates, results, decision, and when you would revisit it.
11. Interview questions#
- How would you choose a serving stack? Walk me through your process.
- What is the top criterion, and why do people overlook it?
- When would you choose TensorRT-LLM over vLLM, and when not?
- Why is peak throughput the wrong comparison metric?
- What makes migration between engines easy or hard?
- When is building your own inference engine justified?
- Your team wants to switch engines for a claimed 20% improvement. What do you ask them?
12. Further reading#
Checked on 12 November 2026.
- vLLM benchmark CLI (
vllm bench) - MLPerf Inference, the closest thing to a neutral comparison
- llm-d v1.0.0 release
- NVIDIA Dynamo releases
- Hugging Face TGI documentation (maintenance-mode notice)
- Each engine’s own benchmarking guide: SGLang, TensorRT-LLM