Queue spillover does not look dramatic at first. Then it compounds and everything slows at once.
If you wait for user-facing latency alerts, you are already paying for retries, timeout storms, and lost trust.
Operator Insight
The core argument: backpressure must be managed as a first-class control loop, not an after-the-fact incident response.
Queue Pressure Formula
Queue Pressure = (Queue Depth * p95 Service Time) / Effective Worker Capacity
Interpretation:
< 0.8: healthy headroom0.8-1.1: unstable edge> 1.1: overload likely
Concrete example: depth 600, p95 service time 0.8s, capacity 500 gives pressure 0.96. You are not down yet, but you are one traffic spike away from cascade.
Threshold Policy
| Pressure band | Mandatory action | Owner |
|---|---|---|
< 0.8 | Normal operations | Workflow owner |
0.8-1.1 | Enable degraded mode, trim non-critical calls | On-call operator |
> 1.1 | Shed low-priority traffic and freeze new experiments | Incident captain |
Minimum Instrumentation
- Queue depth by workflow
- Queue age p95/p99
- Tool-call service time p95/p99
- Retry count and retry age
- Traffic shed volume by priority
If these five are not on one screen, you are reacting blind.
15-Minute Recovery Playbook
- Identify top two queues by pressure.
- Apply one high-impact mitigation (
shed,slow, orreroute). - Re-check pressure after 5 minutes.
- If pressure stays
> 1.1for 15 minutes, trigger rollback or traffic pause.
Tradeoffs and Limits
- Aggressive shedding protects stability but can hurt lower-priority user cohorts.
- Degraded mode can hide quality issues if fallback accuracy is weak.
- Capacity adds are expensive; do not scale blindly before classifying traffic tiers.
- Queue pressure is predictive, not perfect. Keep hard fail-safes for critical paths.
Source Citations
- Google SRE Workbook: Addressing Cascading Failures
- AWS Builders Library: Timeouts, Retries, and Backoff With Jitter
- OpenTelemetry Metrics Data Model
- NIST AI Risk Management Framework 1.0
CTA
Run the same guardrails: Get the Agent Readiness Audit