Methodology
The rules every number on this site follows.
Core tests (scenarios/00..04)
Five core scenarios define the cross-target benchmark:
| id | test | what the client sends | load | streaming | status |
|---|---|---|---|---|---|
00 | Rig baseline | Direct to fake-llm (no gateway) | constant 200 req/s, 30 s warm-up + 120 s measured | configurable | floor |
01 | Chat completions | OpenAI POST /v1/chat/completions | constant 200 req/s, 30 s warm-up + 120 s measured | no | measured |
02 | Chat SSE stream | OpenAI POST /v1/chat/completions | constant 200 req/s (fake-fast) or 100 req/s (fake-realistic) | yes (SSE) | ready |
03 | Capacity ramp | OpenAI chat | stepped 100 → 1,000 req/s in 100 req/s steps, 60 s hold/step | no | ready |
04 | Agentic payloads | 64 KiB multi-turn + 24 JSON Schema tools (fake-tools) | constant 50 req/s, 20 s warm-up + 120 s measured | no | ready |
Extended tests (scenarios/extended/05..13)
Specialized scenarios are kept under scenarios/extended/ and run on demand (./run.sh run <id> or ./run.sh suite --with-extended):
| id | test | what the client sends | load | streaming | status |
|---|---|---|---|---|---|
05 | Endurance soak | OpenAI chat | constant 100 req/s for 3,600 s across 6 drift slices | no | ready |
06 | Multi-tenant & DB audit | 200 Zipf-skewed virtual keys + DB token reconciliation | constant 200 req/s, 30 s warm-up + 120 s measured | no | ready |
07 | Rate-limit accuracy | OpenAI chat against 600 req/min fake-limited | constant 50 req/s (3,000 req/min) for 60 s | no | ready |
08 | Anthropic Messages | Anthropic POST /v1/messages | same load shape as 01 | no | measured |
09 | Anthropic SSE stream | Anthropic POST /v1/messages | same load shape as 02 | yes (SSE) | ready |
10 | OpenAI Responses | OpenAI POST /v1/responses | same load shape as 01 | no | ready |
11 | Responses SSE stream | OpenAI POST /v1/responses | same load shape as 02 | yes (SSE) | ready |
12 | Chaos & failover | fake-failover (seeded 10% HTTP 503 → fake-fast), brownout & stream drops | constant 100 req/s, 20 s warm-up + 120 s measured | configurable | ready |
13 | Streamed concurrency | OpenAI POST /v1/chat/completions | closed loop: 10 → 100 open streams, 10 s ramp + 30 s hold/step (fake-realistic) | yes (SSE) | ready |
13 is closed loop: its load unit is streams, not req/s, so its figures are never plotted against the arrival-rate scenarios.
Strict capability tiers (governance vs relay)
AI gateways differ fundamentally in what they do on the request path. Campaigns require an explicit -m relay or -m governance flag so tiers are never mixed. The dividing line is per-request database writes, not whether a database exists at all — a target may hold keys in memory, SQLite, or Postgres and still be a relay as long as a served request persists no row.
- Strict
relaytier: the request path performs zero database writes (bifrost,gomodel,kong,litellm,portkey). - Strict
governancetier: a per-request usage/cost/metadata row is persisted to the rig's Postgres (PG_CPUSET), with prompt/response body and header logging disabled on every target (bifrost,einfachllm,gomodel,litellm,new-api).
Every row on the leaderboard carries a governance or relay badge, and dual-mode targets (bifrost, gomodel, litellm) can be measured in either tier via ./run.sh ... --mode relay|governance.
Relay tier — settings per gateway
| gateway | per-request DB writes | key store | rate limits / budgets | notable settings |
|---|---|---|---|---|
bifrost | none | SQLite config store (read-only on the path) | none | logging off (logs_store disabled); virtual-key auth |
gomodel | none | SQLite (auth_keys only) | none enabled | logging + usage tracking off |
kong | none | declarative config in memory | none (no rate-limit plugin) | DB-less (KONG_DATABASE: off), HS256 JWT |
litellm | none | Postgres (key tables still run) | rpm: 600 on fake-limited only | disable_spend_logs / disable_error_logs; no per-request spend rows |
portkey | none | n/a | none | OSS build has no inbound auth |
Relay means the request persists no row, not that the target is DB-free: litellm keeps a Postgres container for virtual keys, and bifrost/gomodel keep a local SQLite store — all without writing per request.
Governance tier — settings per gateway
| gateway | rows written per request | prompt/response body stored | key store | rate limits / budgets | notable settings |
|---|---|---|---|---|---|
einfachllm | one usage row (+ hourly rollups) | no (audit content off by default) | Postgres | fake-limited 600/min (scenario 07 only) | usage sink always on; Server-Timing split; Prometheus |
bifrost | one metadata log row | no (disable_content_logging) | Postgres config store | none | Postgres logs store; virtual-key auth enforced |
gomodel | request log + usage row | no (bodies/headers off) | Postgres | none enabled | Postgres storage; 30-day retention |
litellm | one spend-log row | no (prompt storage not enabled) | Postgres | fake-limited 600/min (scenario 07 only) | Postgres LiteLLM_SpendLogs |
new-api | one consume-log row | no (verified content: null) | Postgres (+ token cache) | all global limits disabled | batched consume logs; CountToken off |
Governance is not one write model: gomodel writes two rows per request while the others write one, and einfachllm/new-api/litellm persist billing fields that bifrost does not. Read governance rows with that per-target write cost in mind.
Setup
What is the same for every measured test:
| Parameter | Value |
|---|---|
| Load generator | k6 (or oha via -g native), constant arrival rate (open loop) |
| Repetitions | 3+, median reported, none dropped; ./run.sh campaign shuffles target order per round |
| Upstream | fake-llm, deterministic Rust server speaking OpenAI Chat, OpenAI Responses, and Anthropic Messages (stream + non-stream) with unique monotonic response IDs |
| Gateway limits | Pinned cpuset, hard cpus + memory cap, swap off — never shares cores with k6 |
| State | Containers and database volume recreated before every repetition |
| Derived metrics | Stack CPU/memory, CPU efficiency (req/s per 1% stack CPU), net latency Δp50/Δp99 vs Scenario 00, cold-start readiness, and DB token-accounting loss |
Constant arrival rate, not constant users: a slow gateway shows up as higher latency and dropped requests instead of quietly receiving less load.
Fairness rules
- Pinned images. Each target is a published image pinned by digest. Runs that were not are flagged source build.
- Recommended config & explicit tiers. Each target is set up the way its own docs recommend, with capability tier (
governancevsrelay) and Anthropic ingress mode (translatedvspassthrough) badged on every row. - Same workload. Same scenario, rate, prompt and model for all. If a target cannot keep up, that is the result.
- Both directions. The repository is maintained by the vendor of one target (einfachllm). Its results follow the same rules, losses included.
Limits
- One machine and a fake upstream: this is gateway overhead, not production latency.
- No TLS, ingress or multi-node setup.
- Timing headers (e.g. LiteLLM vs einfachllm) measure different spans; use Scenario
00net latency (Δp50/Δp99) and end-to-endp99for cross-target comparisons. - Three repetitions support a median and min–max range, not a parametric confidence interval.
Add a gateway
Create targets/<name>/ with a compose.yaml (service gateway, port 8000, pinned by digest), a target.sh, the model config and a NOTES.md. Details are in the README.