Ex-HFT engineer open-sources a C++20 io_uring LLM gateway with 0.18ms median streaming overhead

lluisantoni · reddit · 2026-09-17

A routing engineer at Kottos AI open-sourced llmbridge (Apache 2.0, github.com/kottos-ai/llmbridge), a gateway that accepts OpenAI-compatible clients and translates requests/responses to Anthropic, Gemini or Cohere, including SSE streaming and Anthropic tool calls. Coming from electronic trading, the author built it like a market gateway targeting microsecond-level overhead:

Design: zero third-party runtime dependencies by default (only optional TLS pulls in OpenSSL); hand-written JSON parser/serializer limited to the handled formats, with the DOM holding stringviews into the input buffer and passthrough fields emitted verbatim; a zero-copy, zero-allocation HTTP/1.1 parser; iouring by default with an epoll fallback — 14 method pairs duplicated across backends, with a CI script enforcing ep/ur naming to block cross-backend calls.

Surprises caught by measurement:

Performance: on Jakub A. Wąsek's Enterpilot benchmark (laptop, mock upstream, one worker, no translation), median added latency was 0.07ms non-streaming and 0.18ms streaming, excluding inference. Network parts are Linux-only; the translator is plain C++20 and builds on macOS. Still missing: vision, Gemini/Cohere streaming, and Anthropic-client-to-OpenAI-upstream translation.

Original post →

More from coding & agent

coding & agent channel →