Skip to content
Calcrivo

HTTP/2 Stream Calculator

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

Inputs

streams
connections
rps
ms
KB

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. Values used

    SETTINGS_MAX_CONCURRENT_STREAMS = 128 streams; HTTP/2 connections = 5,000 connections; Requests per second = 40,000 rps; Average request duration = 40 ms; Per-stream flow-control window = 64 KB

  2. HTTP/2 Stream

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

  3. Concurrent Streams In Flight

    = 1,600

  4. Total Stream Capacity

    = 640,000

  5. Streams per Connection

    = 0.32

  6. Connections Needed for the Load

    = 13

  7. Stream Capacity Utilisation

    = 0.25

  8. Worst-Case Flow-Control Memory

    = 41,943,040,000

How it works

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

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.

You might also need