I have been routing every LLM call through LiteLLM for so long that I had stopped reading the leaderboards the way I read benchmark posts in the inference-engine world. Antirion dropped on 2026-10-17 (55 stars at the time of this run, Apache-2.0) and the first thing I noticed was the README’s tone: “we benchmarked our gateway in our own lab,” would have been the usual framing. This one says “we put our binary on the same AWS cluster as Bifrost and LiteLLM, ran open-loop load with fresh processes each repetition, and published the harness so you can run the same numbers.” That posture is rare enough that I kept reading.
The repository is eliasbiondo/antirion. One Rust binary (with the admin console’s static export embedded so there is no separate UI deploy), Apache-2.0, every provider behind one API: OpenAI, Azure OpenAI, Anthropic, Bedrock, Vertex, Gemini, Mistral, Cohere, Groq, Together, Fireworks, DeepSeek, xAI, Cerebras, DeepInfra, Perplexity, plus any OpenAI- or Anthropic-compatible server (vLLM, etc.). Routing primitives include fallback chains, weighted splits, least-cost, least-latency, least-busy, tiers, content classifiers, retries, hedging, circuit breakers. Guards for PII, secrets, keywords, regexes, JSON schemas, tool permissions, topics, moderation, and external judges — applied to requests, responses, and streams, with redaction that keeps the format. SSO via OIDC, SAML, and SCIM. An audit log with change requests. Standalone on an embedded SQLite store, or clustered on PostgreSQL and Valkey with the same binary.
I wasn’t actually shopping for a gateway when I found it. I was looking for an LLM routing layer for an MCP project I’m working on, and Antirion’s antirion-mcp crate (layer 3 in the workspace) implements both MCP eras plus the A2A proxy — multiplexed, namespaced, with OAuth metadata and tool fingerprints. That’s the bet I care about, but the story that landed for me was the benchmark.
The headline number
Cell H1 in docs/benchmarks.md: simple chat at 5,000 requests per second on a single AWS c7i.xlarge (4 vCPUs), open-loop load, mock upstream that answers instantly, one key checked on every request, no request logging, no cache. Five 30-second repetitions, fresh processes per run, medians over the repetitions, 10-second warm-up discarded.
| Gateway | p50 overhead | p99 overhead | Achieved RPS | Errors | CPU / req | Idle RSS | Peak RSS |
|---|---|---|---|---|---|---|---|
| Antirion | 0.53 ms | 0.95 ms | 5,000 | 0 % | 247 µs | 41 MiB | 215 MiB |
| Bifrost 2.2.4 | 19.7 ms | 95.2 ms | 5,000 | 0 % | 717 µs | 498 MiB | 1,389 MiB |
| LiteLLM 1.103.1 | — | — | 0 | 100 % | — | 1,653 MiB | 1,851 MiB |
The cell that is hardest to argue with is the one at the far right. Antirion holds 0% errors and 21,512 RPS in closed-loop 64-connection saturation (cell C32.c64). Bifrost peaks at 6,568 RPS in the same cell. LiteLLM cannot complete a single 5,000 RPS run. That ratio — 0.53 ms vs 19.7 ms vs 100% errors — is the post.
I do want to flag what the cell is and is not. The mock upstream answers instantly, which removes the model from the equation: the rows above are pure gateway overhead. The cell also routes a tiny request (gpt-4.1-mini style), no streaming. The benchmark doc acknowledges both — large bodies, streaming, 1.5-second upstream latency, and the Anthropic Messages dialect each have their own cells in the matrix, and Antirion holds its 0% error rate across most of them with p99s in the 0.51–6.66 ms range. The headline cell isn’t the strongest one for Antirion; it’s the most legible.
Why a single binary can hold 14K RPS on 4 vCPUs
The benchmark methods doc is 36 KB and worth reading in full — it’s the part of the project I trust the most. The headline isolation rules: every machine boots the same Ubuntu 24.04 image with somaxconn=65535, ip_local_port_range=1024–65535, tcp_tw_reuse=1, and the performance CPU governor; the generator and mock each get a dedicated c7i.4xlarge so the gateway’s CPU budget is uncontended; the three roles run in one cluster placement group. Each repetition starts a fresh gateway process, waits for readiness plus a settle time, runs the gateway run, runs the direct run, and stops the process. Five repetitions for H1. A run is invalid if the generator’s schedule slips by more than 0.1 % of requests by 1 ms, if the generator or mock uses more than 60 % of their machine’s CPU, or if the direct run’s p99 is above the mock’s scripted delay plus 1 ms.
What Antirion does differently is not “we wrote it in Rust” — plenty of Rust gateways exist, and Bifrost has a Rust core. The data plane is laid out as a 7-layer workspace where each crate depends only on lower layers and cargo xtask layers enforces the rule:
- Layer 0 (
antirion-core,antirion-error,antirion-json,antirion-console) — types that must not depend on anything. The JSON crate is strict (skim: depth, duplicate members, line/column, top-level spans) so the config crate can validate before anything else loads. - Layer 2 (
antirion-egress,antirion-store,antirion-obs,antirion-dialects) — pooled HTTP/1.1 + h2 via ALPN, an SSRF catalogue that runs URL rules on the string and address rules on every resolved address before connecting, and the model/provider dialect catalog. The egress client does one resend when a pooled connection closed before answering; never more. - Layer 3 (
antirion-providers,antirion-router,antirion-resilience,antirion-limits,antirion-mcp,antirion-guardrails,antirion-cache) — the routing arena, the attempt-loop engine, MCP+ A2A, guardrail stage runners, and the cache (in-memory and Valkey backends, JCS-canonical keys, semantic eligibility). - Layer 5 (
antirion-pipeline) — the data-plane:accept → authenticate → parse → resolve → admit → route → attempt-loop → output guardrails → respond → stream relay → request log. - Layer 7 (
antirion) — the CLI and lifecycle.
The data-plane pipeline (antirion-pipeline/src/) is what holds the cell H1 0.53 ms / 14K saturation numbers. There is no Python anywhere in the request path: no interpreter to warm up, no GC pause to schedule, no worker model where one worker can be stuck on a slow client. The 247 µs CPU per request at 5K RPS is what “no garbage collector, no interpreter, one data thread per CPU” costs in practice on the cells they ran.
What the methodology actually defends against
The reason I keep coming back to this benchmark is that the gates are unusually explicit. A gateway that cannot keep up at 5,000 RPS does not make a repetition invalid — its requests queue and time out, and that shows up as errors, a lower achieved rate, and a higher latency. That is a result, and the doc says so. The validity gates don’t tilt the outcome toward Antirion: if anything they let LiteLLM report its full failure mode (timeouts plus broken bodies, broken down by non-2xx status, connect errors, and timeouts in success_fraction).
A small detail that I found persuasive: the harness records steal time over 5 s from each machine into inventory/settings.txt and checks that the gateway-machine’s instance type and CPU model are what they claim to be. I haven’t seen another AI-gateway benchmark publish the steal-time check. It matters because AWS neighbors can quietly double your “4 vCPU” budget’s effective capacity, and a benchmark that doesn’t measure it can be 30 % faster than what you’d see in your own account.
The --shards N mode on run.sh is also more thoughtful than the usual “split across machines” knob. Each shard runs the same set of targets with the same isolation rules, and the shards’ results are merged into one compare/. Cross-shard comparisons are marked: between cells run on the same machine set, comparing targets is sound; between cells on different sets, the difference mixes the cells with the hosts. Most published benchmarks don’t flag this distinction.
Three things the post didn’t get to
The benchmark matrix has cells I haven’t cited that matter. C4 (Anthropic Messages, 5K RPS) puts Antirion at p99 1.93 ms, Bifrost at 70.0 ms p99 with 0 % errors, and LiteLLM at 30 s p99 with 99 % errors — the Messages dialect is where Python gateways tend to lose the most time, because the body is harder to copy. C8 (streaming, S3 1000 RPS) puts Bifrost’s p99 at 150 ms and Antirion’s at 0.51 ms — the time-to-first-event gap on a stream is what an agentic pipeline actually waits for. C17 (5K RPS with 1.5-second upstream latency) puts Antirion’s p99.9 at 6.14 ms; the gateway doesn’t tail the upstream latency at all, because it doesn’t have to.
There are also things the post deliberately didn’t claim. The numbers above are overhead, not end-to-end latency — pair them with an Anthropic latency profile and they still disappear into the model roundtrip. The mock upstream doesn’t model TLS handshake costs (the test network is on the same placement group; in production on a single connection per request you’ll pay the handshake). And the benchmark is fresh: cells were run on 2026-10-18 (aws-20261018t0107-3a9d), the publish artefacts land in bench/published/2026-10-18-c7i/, and a follow-up rerun on cell C21.401 produced aws-20261018t0157-253e after a config fix. I have not seen longer-term stability numbers.
Trade-offs and what it doesn’t fix
Python existing in your ops stack — if you already run LiteLLM and your monitoring, retries, and failure triage tooling are tuned to its response shapes, swapping for Antirion is a config migration you have to own. The data plane speaks OpenAI, Anthropic, Gemini, and Bedrock, so the clients don’t change, but the admin tooling does.
A2A is partial — docs/development.md §“Known gaps in MCP and A2A” lists subscriptions/listen, the agent directory, and the A2A REST binding as not implemented. If you need those, Antirion is one MCP/A2A feature short of replacing your A2A broker today.
The numbers depend on a setup you’ll have to reproduce — the benchmark uses c7i.xlarge (Intel Xeon under Sustained All-Core Turbo, dedicated 4 vCPUs at a known frequency). If you run on t3 (burstable, CPU credits, shares a physical core), the relative ordering holds but the absolute overhead shifts. The doc says so and provides a --topology t3 mode that re-runs the same matrix on burstable machines; I’d treat the cost-side numbers (the --cost $X ceiling rows in the “Cost and time” table) as the conservative point to plan around.
There is no hosted version — Antirion is self-hosted by design (a single distroless image, runs as UID 65532). If you want someone else to operate it, this isn’t that product yet.
Run it yourself
docker run -d --name antirion -p 8080:8080 -p 8081:8081 \
-v antirion-data:/var/lib/antirion eliasbiondo/antirion
docker logs antirion # prints the console URL and (once) the admin token
The data plane lives on :8080, the admin plane and console on :8081. From the console: invite a team, add a provider (OpenAI or Anthropic), add a model (the console shows each model’s list price and applies it if you leave the price fields blank), create an API key, and point any OpenAI SDK at http://localhost:8080/v1. The benchmark itself is reproducible: bench/run.sh --topology ref --shards N --deadline 45m runs the published matrix on your own AWS account, with the per-shard cost and wall-time estimates pre-computed from the bundle’s cells/comparison.tsv. Quota is checked up front, the cost cap defaults to $15 expected, and the plan refuses to start if either fails.
If I had been asked six months ago how a single binary on a $0.18/hr machine could hold 14K RPS at 0% errors while LiteLLM falls over at 5K RPS, I’d have asked to see the harness before the table. The harness is in the repo. That’s the post.
Comments
Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.