Queue backpressure during regional failover
An illustrative post-mortem demonstrating header facts, incident timelines, and code blocks.
- status
- resolved
- duration
- 42m
- impact
- elevated p99 latency
- systems
- router · worker pool
summary
This sample document shows how pm entries format incident metadata and chronologies. Replace the sample src/content/docs/*.mdx files with your own notes, post-mortems, and architecture decision records.
Retries without an explicit deadline or concurrency budget turn partial capacity loss into a self-inflicted overload.
timeline
- 14:02+00:00triggerPrimary zone health checks fail and traffic shifts to secondary capacity
- 14:09+07:00symptomWorker queue depth crosses threshold as retry storms amplify load
- 14:21+19:00mitigationAdmission limiter enabled at router edge to cap in-flight requests
- 14:44+42:00Queue drains and p99 latency returns to baseline
remediation
Capping per-route queue depth and failing fast when the shared request budget expires prevents retry amplification:
export function shouldAdmit(inFlight: number, maxInFlight: number, remainingMs: number): boolean {
return remainingMs > 50 && inFlight < maxInFlight;
}follow-ups
- Enforce a single end-to-end deadline header across caller and worker hops.
- Alert on queue wait time in addition to error rate so backpressure surfaces early.