Benchmarking LLM gateways: p50 latency hides the real bottlenecks in streaming under load

jkriket · reddit · 2026-11-13

An engineer working on LLM gateway infrastructure shares hard-won benchmarking lessons. Headline 'microsecond overhead' numbers are misleading: routing logic, time inside the gateway, and client-perceived added latency are three different numbers. Practical advice: (1) benchmark against a direct baseline using a mock provider with fixed latency to isolate gateway/network/load-generator overhead; (2) use open-loop load generation, otherwise a slow gateway also slows request arrival and masks problems under load; (3) watch HTTP versions — at 5,000 req/s with 1.5s upstream responses that's 7,500 concurrent requests, and HTTP/1.1 vs HTTP/2 differs enormously; (4) benchmark streaming separately, since gateways fine with JSON can behave very differently with thousands of concurrent SSE streams, especially translating between OpenAI and Anthropic formats; (5) look beyond the median — p99 time-to-first-token and stream completion latency reveal bottlenecks averages hide. Conclusion: sustained-concurrency streaming behavior is a more meaningful production benchmark than routing microseconds.

Related event: LLM gateway benchmarks: median latency tiny, but p99 and concurrent streaming hurt(2 posts)→

Original post →

More from Infra

Infra channel →