Measure every endpoint. Route on the evidence.
Afterburn connects to the inference endpoints a team already runs (vLLM, SGLang, llama.cpp, Ollama or a hosted API), measures them on its own prompts and sends each request to the one that keeps its latency limit for the least cost. Every change keeps its evidence.
01 · The problem
Tuned once, never measured again.
Most inference endpoints are chosen from a launch-day benchmark and kept long after the models, the engines and the traffic have moved on.
-
Picked on a hunch
An endpoint is chosen once, from someone else’s numbers, on prompts that look nothing like yours.
-
Latency nobody owns
The 95th percentile creeps up a few milliseconds at a time, and nobody sees it until users do.
-
No baseline
When an engine, a model or a provider changes, there is nothing kept to say whether it helped.
02 · The loop
Observe. Decide. Route. Prove.
One loop, running all the time. Each panel is laid out the way the console shows it, filled with sample data.
-
01Observe
Afterburn measures each endpoint the way users meet it: time to first token, time between tokens, the whole answer and its errors, timed on the stream. Where the engine publishes Prometheus metrics, it reads the queue and the KV cache too.
Endpoint · vllm-h100Sample data
- model
- Llama 3.1 8B Instruct
- first token, p95
- 45 ms
- between tokens, p50
- 11 ms
- KV cache in use
- 64%
- errors
- 0 of 40
-
02Decide
A route has a limit: first token under a p95, the whole answer under a p95, an error budget. A benchmark keeps only the endpoints that hold it, ranks them by measured cost per million tokens and says why the others were turned down.
Route · support-chatSample data
- limit
- first token p95 ≤ 300 ms · errors ≤ 2%
- vllm-h100
- 45 ms · $0.24 / 1M · selected
- llama-cpp-mac
- 126 ms · qualifies
- sglang-l40s
- 254 ms · keeps the limit
-
03Route
Apps call one OpenAI-compatible URL and name a route as the model. Each request goes to the route’s primary endpoint and falls through to the next on errors and timeouts. Every change is a revision; going back is one step.
Gateway · support-chatSample data
- primary
- vllm-h100
- fallbacks
- llama-cpp-mac, sglang-l40s
- revision
- 2, from 1
- rollback
- one step
-
04Prove
Every request through the gateway is logged with its endpoint, latency, tokens and cost. When a route changes, Afterburn holds the hour before against the hour after, so each decision keeps its own receipt, good news or not.
Change · revision 1 → 2Sample data
- first token, p95
- 254 → 45 ms
- total, p95
- 256 → 47 ms
- cost per 1M output
- $0.16 → $0.24
- requests compared
- 36 before, 44 after
03 · Benchmarks
Where each endpoint breaks the limit.
A benchmark is the same prompts, at a chosen concurrency, to every endpoint. Run it at several loads and you see where each one stops keeping the route’s limit; set it against price and you see which one should serve it. Long contexts change the answer.
Keeps the 300 ms limit, cheapest first
- sglang-l40s$0.177 / 1M · selected
- vllm-h100$0.266 / 1M · qualifies
Turned down
- openrouter-8bover the limit
- llama-cpp-macunpriced (local), not on the chart
04 · Measures
What it measures, and where each number comes from.
| Measure | What it is | Where it comes from |
|---|---|---|
| First token | Time from sending the request to the first generated token, as a user waits for it. | Timed on the stream |
| Between tokens | The average gap between tokens after the first; how fast the answer reads. | Timed on the stream |
| Total | Time until the last token, for the whole answer. | Timed on the stream |
| Throughput | All output tokens over the endpoint’s whole run, at the run’s concurrency. | Benchmark |
| Errors | Requests that failed, timed out or returned nothing, as a share of all. | Benchmark and gateway |
| Cost per 1M out | What a million output tokens cost at your prices, input included, or from hourly capacity. | Prices you set |
| Queue and KV cache | Requests running and waiting, and how full the cache is, while you measure. | Engine /metrics |
05 · The gateway
One URL for every app. The route decides the rest.
Point any OpenAI client at Afterburn and name a route instead of a model. When the primary fails, the next endpoint takes the request before anything has been sent back, and the response says which endpoint answered.
from openai import OpenAI
import os
client = OpenAI(
base_url=os.environ["AFTERBURN_URL"],
api_key=os.environ["AFTERBURN_KEY"],
)
reply = client.chat.completions.create(
model="support-chat", # a route, not an endpoint
messages=[{"role": "user", "content": "Where is my order?"}],
)
print(reply.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: process.env.AFTERBURN_URL,
apiKey: process.env.AFTERBURN_KEY,
});
const reply = await client.chat.completions.create({
model: "support-chat", // a route, not an endpoint
messages: [{ role: "user", content: "Where is my order?" }],
});
console.log(reply.choices[0].message.content);
curl "$AFTERBURN_URL/chat/completions" \
-H "Authorization: Bearer $AFTERBURN_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "support-chat",
"messages": [{"role": "user", "content": "Where is my order?"}]}'
- 01
One URL
Apps call one OpenAI-compatible URL. Anything that speaks the OpenAI-compatible API can be measured and routed.
- 02
A route as the model
Name a route instead of a model. Each request goes to the route’s primary endpoint.
- 03
Fallbacks
On errors and timeouts the request falls through to the next endpoint, before anything has been sent back. A fallback is always on the line-up.
- 04
Revisions and rollback
Every change to a route is a revision, with the traffic either side. Rolling back is one step.
06 · The evidence
Every change keeps its receipt.
When a route changes, Afterburn holds the hour before against the hour after, so each decision keeps its own receipt, good news or not.
Change · revision 1 → 2Sample data
first token, p95
total, p95
cost per 1M output
requests compared
36 before, 44 after
Every request, logged
Every request through the gateway is logged with its endpoint, latency, tokens and cost.
Every change, a revision
Every change to a route is a revision, kept with the traffic either side, and going back is one step.
Every turn-down, explained
A benchmark ranks the endpoints that hold the limit and says why the others were turned down.
Keys sealed, changes audited
Keys are sealed at rest, and every change is on the audit trail.
07 · Your stack
It sits in front. It replaces nothing.
Anything that speaks the OpenAI-compatible API can be measured and routed: the engines a team serves itself, the models on a laptop and hosted providers.
- vLLMServing engine
- SGLangServing engine
- TensorRT-LLMServing engine
- llama.cppLocal models
- OllamaLocal models
- LM StudioLocal models
- OpenRouterHosted models
- PrometheusEngine metrics
Questions
Does Afterburn replace my serving engine?
No. It sits in front of the endpoints a team already runs and decides which one each request goes to. The models, engines and GPUs stay where they are.
What does it need from an endpoint?
An OpenAI-compatible base URL (the one ending in /v1), the model it serves and a key if it needs one. A Prometheus metrics URL is optional.
Are the numbers on this page real?
The panels, charts and screenshots here are sample data, measured against test engines, and every one is labelled. In the console, every number comes from the requests Afterburn sends or forwards for you.
Can a routing change be undone?
Yes. Every change to a route is a revision, a fallback is always on the line-up and rolling back is one step.
Measure every endpoint. Route on the evidence.
Connect the endpoints you already run, benchmark them on your own prompts and route each request on the results.