Build1 distinct publisher3 min readPublished
Gateway overhead is the gateway call minus the direct call. Against the post's 900ms baseline, a 400ms gap is a 44 percent penalty. Finding which stage owns it needs timestamps most gateways do not emit.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Follow any of these and your For You feed starts watching them — no settings page required.
build
Three manual interventions in a month, and every guard was working as designed1 distinct publisher
build
Six MariaDB versions, one real difference: the only reason to leave 10.6 is the July 2026 clock1 distinct publisher
build
Force the tool call, then hand Lightsail a long-lived key1 distinct publisher
build
Separating moderation rejections moved one API gateway's success rate from 95.5% to 98.9%1 distinct publisher
Take the ratio first, because the ratio decides whether the number transfers to you. 400ms against a 900ms direct baseline is a 44 percent penalty, and it is 31 percent of the wall clock the gateway reports [21][20]. A 900ms provider call implies short output. The post says so itself: network setup is a much larger share of total latency for short AI requests, while provider inference usually dominates longer generations [13]. If your median request streams for several seconds, the same 400ms sits in the noise. The subtraction technique still works at any request length, but the size of the alarm it raises shrinks as the request stretches out.
Averages will hide the shape of it. The author compares p50, p95 and p99 instead, because a gateway can look healthy at the median while connection setup, overloaded workers or retries wreck the tail [8]. That distinction is what makes the next step worth the effort: decompose the request into client, gateway, authentication, policy, routing, provider, streaming response and back, and stamp each boundary [9]. A gateway that reports only "request completed in 1.3s" leaves you exactly where you started [10].
Now the mechanisms, in the order they are cheap to check. If the gateway opens a fresh outbound connection per request, it pays DNS lookup, TCP setup and TLS negotiation again every time, when the provider connection should be pooled and reused, along with the connection from your application to the gateway [11]. The things to read are configuration, not code: keep-alive, whether the HTTP client actually reuses connections, pool settings, repeated DNS resolution, per-request TLS, idle timeouts that reap connections too aggressively, and whether the gateway even runs near the provider region [12].
Authentication is the next suspect, because it is synchronous by construction: request, database lookup, user lookup, permission lookup, then continue, on every call [14]. The post's illustrative figures are a 2ms cache hit against an 80ms miss [15]. That miss path is 40 times the hit path and 78ms above it [23], which is real money, and it is also only a fifth of the 400ms [22]. Even a 100 percent miss rate would not fund the whole regression. Expect a budget spread across stages rather than one villain. The fix is a matter of sequencing rather than subtraction: keep the auth check, but strip the unnecessary synchronous work around it [16].
Then logging, which is where the gap usually gets its bulk. One request can trigger request logging, token accounting, cost calculation, audit logging, trace creation, database writes, metrics and security events, and if the gateway waits for all of that before forwarding, the latency accumulates in front of the model call [17]. The whole delta between "write audit record, wait for database, continue" and "enqueue audit" is scheduling [18]. Computing what a request cost, on the critical path of that request, is an expensive way to find out.
One caveat on provenance. The author writes the connection and authentication sections in the conditional, as checks and measurements he would run [19], and the supplied text ends mid-sentence in the logging discussion without naming the stage that owned his own 400ms [25]. So the 2ms and 80ms are worked examples, not a system you can benchmark against. What you should end up with is your own stage budget in milliseconds. That artifact is also the one that tells you whether the gateway earns its place.
Ranked by verification strength, evidence, and original report placement.
If the gateway creates a new outbound connection for every AI request it repeatedly incurs DNS lookup, TCP setup and TLS negotiation costs; the provider connection should normally be pooled and reused, and the same applies to the application-to-gateway connection.
The connection checklist is: HTTP keep-alive enabled, HTTP client reusing connections, connection pooling configured correctly, whether DNS is resolved repeatedly, whether TLS is negotiated every request, whether idle connections are closed too aggressively, and whether the gateway runs close to the provider region.
Network setup becomes a much larger percentage of total latency for short AI requests, while for longer generations provider inference usually dominates, though that does not make inefficient connection handling acceptable.
The supplied text of the post ends mid-sentence in the logging section, at "enqueue audit", without naming a single resolved cause for the author's own 400ms.
The post lists the delay's likely origins as connection setup, DNS or TLS negotiation, authentication lookups, synchronous logging, policy checks, retries, buffering, provider selection, or simply measuring time incorrectly.
The test is to send the same request twice, once directly from the application to the provider and once through the gateway to the same provider, keeping model, prompt, API key, generation settings, region and request payload identical.
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · September 2, 2026
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
One unnamed stack, one voice
Every figure in this story — 900ms direct, 1.3s through the gateway, 2ms versus 80ms on the auth cache, 20ms per policy rule — comes from a single dev.to post that names neither the gateway, the provider, nor the model, and whose investigative sections are phrased as things the author would check rather than things measured. The engineering mechanics hold up on their own terms: repeated DNS, TCP and TLS setup really does cost what the post says, and blocking on an audit write really does land in the request path. That reasoning is what carries the piece; the numbers are unreplicated self-report.
No deployment signal at all
Nobody in this reporting says who runs such a gateway, at what request volume, or whether a single configuration change was made and held. The one gesture toward outside measurement — 'recent gateway benchmarking work' that supposedly times identity, classification, policy and audit separately — names no benchmark, no tool and no publisher, so there is nothing to count.
The headline promises a culprit the text never names
'Here's Where It Went' is a strong promise, and the post keeps the arithmetic honest while quietly failing to keep that one. It locates 400ms of overhead by subtraction, hands over a suspect list and two checklists, and then breaks off inside an unfinished retry example without ever pinning the author's own regression to a stage. The overstatement is in the framing, not the technique — the method is presented more modestly than the title, and the gap between them is what a reader arriving from the headline will feel.
No stake disclosed either way
The approving asides are where a commercial tie would normally surface: 'modern gateway designs commonly expose separate gateway processing and provider timing' and 'recent gateway benchmarking work' both praise something without saying what. That is thin ground on which to allege a vendor interest, and the supplied material says nothing about who the author builds for, sells, or is paid by — so we are not going to invent one.
Sure about the text, not about the stack
We hold the whole post, so what it does and does not establish is not really in question — the method, the hypotheticals, the conditional checklists and the point where it stops are all visible on the page. What we cannot assess is the world behind it: one anonymous deployment, no second account, no named software. High confidence about the reporting, low confidence about the facts it reports, which is why this sits mid-scale.