Description
A per-request authorization check reads role-based access policies from a database lookup as part of every query's processing. That lookup was configured with a timeout/retry profile meant for background or asynchronous work — a long timeout with multiple retries — even though it sits directly in the synchronous path every request has to pass through. Under any slowness or transient issue on that lookup, a single request could consume a large chunk of, or exceed, the entire request's time budget on this one step alone, well before ever reaching the actual query.
Environment
- Commit ID:
42b5c6b (v0.2.2)
- Environment: prod
Step to reproduce
A root cause
The client used for this lookup was constructed with a general-purpose, background-task timeout/retry configuration (long timeout, multiple retries) instead of a fail-fast configuration meant for steps directly on the customer-facing request path. The codebase already has a dedicated fail-fast configuration for exactly this kind of synchronous, latency-sensitive call; this lookup was never switched to use it.
Context
The system distinguishes background/ingestion-style database calls (tolerant of slower dependencies) from customer-facing, synchronous calls (expected to fail fast so a hung dependency can't tie up request capacity). This authorization lookup sits on the synchronous side but was wired with the background-side profile.
Risks & Known Unknowns
- This was not the cause of the specific incident under investigation, but is a latent risk that could independently exhaust a request's time budget under database slowness.
- Any other synchronous-path lookup using the same general-purpose client construction should be audited for the same mismatch.
Description
A per-request authorization check reads role-based access policies from a database lookup as part of every query's processing. That lookup was configured with a timeout/retry profile meant for background or asynchronous work — a long timeout with multiple retries — even though it sits directly in the synchronous path every request has to pass through. Under any slowness or transient issue on that lookup, a single request could consume a large chunk of, or exceed, the entire request's time budget on this one step alone, well before ever reaching the actual query.
Environment
42b5c6b(v0.2.2)Step to reproduce
A root cause
The client used for this lookup was constructed with a general-purpose, background-task timeout/retry configuration (long timeout, multiple retries) instead of a fail-fast configuration meant for steps directly on the customer-facing request path. The codebase already has a dedicated fail-fast configuration for exactly this kind of synchronous, latency-sensitive call; this lookup was never switched to use it.
Context
The system distinguishes background/ingestion-style database calls (tolerant of slower dependencies) from customer-facing, synchronous calls (expected to fail fast so a hung dependency can't tie up request capacity). This authorization lookup sits on the synchronous side but was wired with the background-side profile.
Risks & Known Unknowns