Sizing open requests on a streaming API
A streaming endpoint accepts 110 requests per second. One worker slot remains occupied until the response closes, with 1.5 seconds at p95 and 4.5 seconds at p99.
Jump to resultsInputs
Results
Runs in your browser- In flight at p95 duration
- 165requests
- Pool utilization at p95
- 75%
- Original traffic at saturation
- 146.667req/s
The p95 scenario is within the target. Check burst behavior and the p99 duration case.
| Effective arrival rate | 110 req/s |
|---|---|
| In flight at p50 duration | 49.5 requests |
| In flight at p99 duration | 495 requests |
| Slots at 75% target | 220 slots |
| Unused p95 pool share | 25 % |
| Illustrative queue multiplier | 4 × |
What to try
The p95 case uses 165 slots, while the p99-duration scenario can exceed capacity. Model idle-client behavior and stream timeouts with production residence-time data.
How the estimate works
In-flight requests L = arrival rate λ × time in system W
The effective arrival rate includes retries. The three concurrency values are separate what-if calculations that use p50, p95, and p99 as fixed durations. Little’s Law itself connects steady-state averages, so these estimates have no concurrency percentile guarantee.
Pool utilization uses the p95 planning duration. The saturation ceiling is the original request rate that would keep every slot occupied at that fixed duration. Slots needed at a target utilization are rounded up.
The curve is a normalized M/M/1 illustration, 1 ÷ (1 − utilization). Real multi-worker queues, burstiness, and load-dependent latency can shift the knee. The curve clamps the vertical scale at 10× for readability.
Frequently asked questions
Should time to first byte be used for a streaming slot estimate?
Use the entire time the stream occupies the resource. Time to first byte only captures the waiting time until output begins.
Can asynchronous streaming support more open requests than worker threads?
Yes, if requests share threads while waiting. Use the resource that remains reserved, such as open stream slots, sockets, or buffers.