Skip to main content
Free plan, no cardStart free

EngineeringExplainer

The Regression You Can’t See: Why Microsecond API Timing Matters

A service that went from 0.3 ms to 0.9 ms tripled its latency and still reads "under 1 ms" on a display that shows whole milliseconds. Resolution is an early-warning system.

Summarise with AI

Opens a new chat with only this request: Summarise the key points of this article: https://dokimore.com/blog/microsecond-api-timing

0.001 msResolution of the per-phase timings the precision load engine records; the request builder displays whole milliseconds
5Phases the precision engine records per HTTP request: DNS, connection, TLS, first byte and end
Every sampleWhat a load run keeps in its histogram, at microsecond resolution, behind the P50, P95 and P99
HTTPThe scope today; the dedicated gRPC and SOAP testers do not report microsecond timing yet

In short

  • A request’s time is several phases, not one number: connection, the wait for the first byte, and the transfer. The wait for the first byte is mostly the server’s share, one network round trip plus the query, the serializer and the cache miss, and it is the phase a backend regression shows up in first.
  • A display that rounds to whole milliseconds, or a dashboard that bands values into "single digits", hides a regression until it compounds. Five services that each slipped from 0.3 ms to 0.9 ms cost 3 ms more per request while every chart still reads "under 1 ms"; five that slipped from 3 ms to 9 ms cost 30 ms while every banded chart still reads "single digits".
  • Watch percentiles over a window and alert on relative drift from a baseline, not only on absolute thresholds; regressions tend to follow deploys, so compare the days before and after each one.

About this article

Format
Explainer: what a thing is, why it matters, and the evidence.
Written for
Developers who own their tests · SDETs and automation engineers
Where it applies
Every market. The rules that differ by country are on the country pages.

Death by rounding

Two services answer in "under 1 ms" on a display that shows whole milliseconds. One takes 0.3 ms, the other 0.9 ms; the second is three times slower, and the display cannot tell them apart. Two more answer in "single-digit milliseconds" on a dashboard that bands its values: 3 ms and 9 ms, same band, same colour. Put five services like that in one request path and the user-facing budget is gone, with every individual chart still green. Nobody lied; the resolution did.

What a request’s time is made of

Browsers and load tools agree on the shape of a request even when they name the parts differently. The Resource Timing interface, as documented on MDN, records a sequence of instants for every fetch: the DNS lookup, the connection and the TLS handshake, the moment the request is sent, the moment the first byte of the response arrives, and the moment the last byte arrives. k6 exposes the same phases as metrics: connecting, TLS handshaking, sending, waiting and receiving, and defines its headline http_req_duration as sending plus waiting plus receiving, with the DNS and connection time left out.

That split is the useful part. The wait for the first byte is mostly the server’s share of the time: one network round trip plus the query, the serializer, the cache miss. The receiving phase is the payload: a response that grew. The connection phases are the network and the handshake. A regression in each phase has a different owner, and a single total hides which one to call.

Why one number lies

An average flattens the slow requests that users remember into a comfortable mean. Percentiles keep them: the P95 says that one request in twenty took at least this long, and the P99 says one in a hundred. Load tools report percentiles for this reason; Apache JMeter’s dashboard report prints three configurable percentiles per transaction, 90, 95 and 99 by default. A percentile over a rolling window is the number that moves when something drifts.

In the product

What Dokimore measures, exactly

Two places in Dokimore time requests, and they do not have the same resolution, so here is the exact position. When a recorded flow runs under load, the performance engine keeps every sample in a histogram stored in microseconds, corrected for coordinated omission when the run sets an expected interval, and computes P50, P95 and P99 from all of them, not from a window. Underneath it, a precision load engine written in Go records each HTTP request at five instants from the runtime’s own trace hooks, DNS lookup, connection, TLS handshake, first byte and end, and keeps them in microseconds; when a request falls back to the Node path, only the total duration is recorded. The request builder in the API studio, which sends one request at a time, measures it with a monotonic clock and displays whole milliseconds; a single request has no distribution, so a percentile would be meaningless there anyway.

So the microsecond claim is about the load engine’s recorded data: a drift from 0.31 ms to 0.94 ms in the first-byte phase is in the histogram on day one, while it is still one slow query or one chatty serializer and not an incident. The dedicated gRPC and SOAP testers do not report microsecond timing yet; the resolution above applies to HTTP requests, including GraphQL and SOAP bodies sent over HTTP, that the load engine sends.

Do this with your own APIs

  1. Pick the five most-called endpoints and record their P95 this week. Without a baseline, every later number is an opinion.
  2. Split the total into first-byte wait and transfer. A slow first byte is the backend’s; a slow transfer is the payload’s.
  3. Alert on relative drift from the baseline, for example a P95 that is 50% above last week’s, not only on an absolute threshold that was set once and never revisited.
  4. Compare the days before and after each deploy. Regressions tend to follow releases, and a chart with release markers on it turns "it feels slower lately" into a date.

Questions people ask

What is a good API response time?

There is no universal number; the budget belongs to the feature that waits for the response. Tools ship defaults that show the usual range: Apache JMeter’s Apdex report counts a request as satisfying up to 500 ms and tolerable up to 1,500 ms by default. For a service called several times per page view, a budget in the low tens of milliseconds is more realistic, and the useful question is whether the P95 is drifting from where it was.

Why does rounding hide regressions?

Because a change smaller than the display resolution is invisible, and several invisible changes add up. A service that moves from 0.3 ms to 0.9 ms tripled its latency while a whole-millisecond display still shows "under 1 ms"; a dashboard that bands its values hides 3 ms becoming 9 ms the same way. Timing kept at microsecond resolution in the recorded data shows the drift while it is still one cause.

What is time to first byte?

The time from sending the request to receiving the first byte of the response. The Resource Timing interface records it as responseStart, and k6 reports it as http_req_waiting. It is mostly the server’s share of the request, one network round trip plus the work the server did, which is why a backend regression appears there before anywhere else.

Does Dokimore time gRPC and SOAP requests at microsecond resolution?

Not yet. The precision load engine records HTTP requests, including GraphQL and SOAP bodies sent over HTTP, in five phases at microsecond resolution, and a load run keeps every sample in a histogram for the percentiles; the request builder shows a single request in whole milliseconds. The dedicated gRPC and SOAP testers record coarser timing today, and this article says so rather than implying otherwise.

How we measured this

  • Load runs: the performance engine keeps every sample in a histogram stored in microseconds, with coordinated-omission correction when the run sets an expected interval, and computes P50, P95 and P99 from all of them. The precision load engine times each HTTP request at five instants (DNS, connection, TLS, first byte, end) from the Go runtime’s HTTP trace hooks and keeps them in microseconds; when a request falls back to the Node path only the total is recorded. The request builder displays a single request in whole milliseconds.
  • The phase names and definitions are quoted from the MDN and k6 pages on the dates beside them; JMeter’s defaults from its user manual. We did not benchmark any tool.
  • Corrected 2026-10-25: an earlier version said the studio timed REST, GraphQL, gRPC and SOAP alike. Corrected 2026-10-28: the previous version said the request builder reported each request in milliseconds to three decimal places and that percentiles came from the last 1,024 samples per endpoint; the builder displays whole milliseconds, load percentiles come from every sample in a histogram, and the 1,024-sample structure is an internal latency tracker that load runs do not use. The 3 ms to 9 ms example, which whole-millisecond rounding cannot hide, is now a banding example beside a sub-millisecond one.

Sources

  1. MDN, PerformanceResourceTiming: the timing milestones of a fetch as documented there; responseStart is the first byte of the response read
  2. Grafana k6, built-in metrics: http_req_duration = sending + waiting + receiving; http_req_waiting is the time to first byte read
  3. Apache JMeter, generating the dashboard report: three percentiles per transaction (90, 95, 99 by default) and Apdex thresholds of 500 ms and 1,500 ms read

See it on your own project

Every new account starts a 14-day Solo Pro trial, then 14 days on the Free plan. No card. Record one flow and measure the difference on your own numbers.

  • Free plan, no card
  • 14-day Solo Pro trial
  • Demo replies within one business day
  • Data hosted in India