Skip to content

Split header time from body-read time on the docs upstream - #1674

Merged
RhysSullivan merged 1 commit into
mainfrom
diag/body-read-probe
Aug 18, 2026
Merged

Split header time from body-read time on the docs upstream#1674
RhysSullivan merged 1 commit into
mainfrom
diag/body-read-probe

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Elimination so far, all measured in the same requests that took 3-11s wall: preWorkMs 0-4ms, cacheProbeMs 2-21ms, timerProbeMs 1ms, fetchProbeMs median 1ms, cpu 18-323ms.

Everything generic is fast. But two app operations are genuinely slow, and both read a response body:

  • http.client GET to executor.mintlify.dev — p50 3001ms from the Worker, while the same URL is 0.063-0.196s from a laptop (x-vercel-cache: HIT, 179KB) and a probe fetch to cloudflare.com from inside the same request is 1ms.
  • workos.session.jwt_verify — p50 2895ms, whose only I/O is a Cache API hit plus hit.json(), while a Cache API miss probe is 4ms.

The earlier fetchProbeMs never read a body, which is why it looked fast. This times headers and body separately. Gated to /robots.txt.

fetch() resolves when headers arrive, so the earlier probe returned ~1ms
without ever reading a body. Both genuinely slow operations read one: the
docs proxy reads a 179KB page and the JWKS store calls hit.json(). Time
headers and body separately on the exact upstream the docs proxy uses,
gated to /robots.txt so normal traffic never pays for it.
@RhysSullivan
RhysSullivan merged commit 68d5e8b into main Aug 18, 2026
@RhysSullivan
RhysSullivan deleted the diag/body-read-probe branch August 18, 2026 22:10
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant