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 results

Inputs

Peak traffic and latency
req/s
×
ms
ms
ms
Pool sizing

Measure residence time at the boundary that owns the slots, such as database connection hold time.

%

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.

Queue amplification as utilization rises
Illustrative latency by pool utilizationp95 reference duration 1500 ms. 75 % modeled pool utilization.1,500 ms6,000 ms10,500 ms15,000 ms0%25%50%75%100%Modeled utilization 75 %
Detailed results
Effective arrival rate110 req/s
In flight at p50 duration49.5 requests
In flight at p99 duration495 requests
Slots at 75% target220 slots
Unused p95 pool share25 %
Illustrative queue multiplier4 ×

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.

Open API throughput & concurrency calculator