Skip to content
ENExplore Calculators

HTTP/2 Stream Calculator

Work out HTTP/2 stream concurrency, connections needed and the worst-case flow-control window memory a proxy commits.

About HTTP/2 Stream Calculator

HTTP/2 multiplexes many requests over one TCP connection, so concurrency is bounded by streams rather than sockets. Little's law converts request rate and duration into the streams genuinely in flight, which is normally far below the advertised ceiling. The flow-control window is the trap: a generous per-stream window multiplied by the advertised stream limit is a memory commitment measured in gigabytes, and it is what makes an HTTP/2 proxy vulnerable to slow-read attacks.

Formula

HTTP/2 Stream

stream capacity = max concurrent streams × connections; streams in flight = requests per second × request duration (Little's law).

streamCapacity
Upper bound on simultaneous requests across all connections
windowMemory
Stream capacity × flow-control window, the worst-case buffer commitment

Worked example

With the default values below, HTTP/2 Stream Calculator returns Concurrent Streams In Flight of 1,600. Change any input above and every figure here is recalculated in your browser.

Inputs used

SETTINGS_MAX_CONCURRENT_STREAMSaccepts 1–100,000 streams
128 streams
HTTP/2 connectionsaccepts 1–10,000,000 connections
5,000 connections
Requests per secondaccepts 1–10,000,000 rps
40,000 rps
Average request durationaccepts 0.1–600,000 ms
40 ms
Per-stream flow-control windowaccepts 1–16,384 KB
64 KB

Results

Concurrent Streams In Flight
1,600
Total Stream Capacity
640,000
Streams per Connection
0.32
Connections Needed for the Load
13
Stream Capacity Utilisation
0.25%
Worst-Case Flow-Control Memory
39 GiB

Step by step

  1. 1Values used
  2. 2HTTP/2 Stream
  3. 3Concurrent Streams In Flight= 1,600
  4. 4Total Stream Capacity= 640,000
  5. 5Streams per Connection= 0.32
  6. 6Connections Needed for the Load= 13
  7. 7Stream Capacity Utilisation= 0.25
  8. 8Worst-Case Flow-Control Memory= 41,943,040,000

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is HTTP/2 Stream calculated?

stream capacity = max concurrent streams × connections; streams in flight = requests per second × request duration (Little's law). HTTP/2 multiplexes many requests over one TCP connection, so concurrency is bounded by streams rather than sockets. Little's law converts request rate and duration into the streams genuinely in flight, which is normally far below the advertised ceiling.

Why does HTTP/2 Stream matter?

The flow-control window is the trap: a generous per-stream window multiplied by the advertised stream limit is a memory commitment measured in gigabytes, and it is what makes an HTTP/2 proxy vulnerable to slow-read attacks.

What values do I need to enter?

This calculator takes 5 inputs: SETTINGS_MAX_CONCURRENT_STREAMS, HTTP/2 connections, Requests per second, Average request duration, Per-stream flow-control window. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

HTTP/2 Stream Calculator | Calcrivo