Skip to content
Documentation

HTTP/2 Hosting Limits Configuration

Configure the HTTP/2 specific protocol limits for the Kestrel web server.

For detailed information about HTTP/2 settings in .NET 8, see Kestrel HTTP/2 Limits.

HAKOM:TSM:Http:Hosting:Limits:Http2

The following options are available:

Http2
├─ MaxStreamsPerConnection
├─ HeaderTableSize
├─ MaxFrameSize
├─ MaxRequestHeaderFieldSize
├─ InitialConnectionWindowSize
├─ InitialStreamWindowSize
├─ KeepAlivePingDelay
└─ KeepAlivePingTimeout
Element Type Default Required Description
MaxStreamsPerConnection int 100 The maximum number of concurrent HTTP/2 streams per connection.
HeaderTableSize int 4096 The maximum size of the header compression table in bytes (4 KB).
MaxFrameSize int 16384 The maximum size of an HTTP/2 frame in bytes (16 KB). Must be between 16,384 and 16,777,215.
MaxRequestHeaderFieldSize int 8192 The maximum size of a single request header field in bytes (8 KB).
InitialConnectionWindowSize int 128000 The initial connection-level flow control window size in bytes. Must be between 65,535 and 2,147,483,647.
InitialStreamWindowSize int 96000 The initial stream-level flow control window size in bytes. Must be between 65,535 and 2,147,483,647.
KeepAlivePingDelay TimeSpan — The time interval for sending HTTP/2 keep-alive pings. Specified in the format hh:mm:ss. Infinite by default, which disables keep-alive pings.
KeepAlivePingTimeout TimeSpan 00:00:20 The timeout for HTTP/2 keep-alive ping responses. Specified in the format hh:mm:ss.
  • MaxStreamsPerConnection: Controls how many requests can be processed concurrently over a single HTTP/2 connection. Higher values improve throughput for clients making many concurrent requests but increase server memory usage.
  • HeaderTableSize: Controls the HPACK compression table size. Larger values can improve compression efficiency for connections with repetitive headers but use more memory.
  • MaxRequestHeaderFieldSize: Limits individual header field sizes to prevent resource exhaustion attacks.
  • MaxFrameSize: Larger frame sizes can improve throughput by reducing overhead but may increase latency for multiplexed streams.
  • InitialConnectionWindowSize and InitialStreamWindowSize: Control HTTP/2 flow control windows. Larger values allow more data to be in-flight before receiving acknowledgments, improving throughput on high-bandwidth, high-latency connections.
  • KeepAlivePingDelay: When set, the server periodically sends HTTP/2 PING frames to detect disconnected clients. This is useful for long-lived connections but adds overhead.
  • KeepAlivePingTimeout: The maximum time to wait for a PING response before considering the connection dead.

The following examples show the Http2 section within HAKOM:TSM:Http:Hosting:Limits.

flask Basic HTTP/2 configuration

Section titled “ Basic HTTP/2 configuration”

Configure HTTP/2 settings for high-throughput scenarios:

<Limits>
<Http2>
<MaxStreamsPerConnection>200</MaxStreamsPerConnection>
<HeaderTableSize>8192</HeaderTableSize>
<MaxFrameSize>32768</MaxFrameSize>
<MaxRequestHeaderFieldSize>16384</MaxRequestHeaderFieldSize>
<InitialConnectionWindowSize>262144</InitialConnectionWindowSize>
<InitialStreamWindowSize>196608</InitialStreamWindowSize>
</Http2>
</Limits>

flask HTTP/2 with keep-alive pings

Section titled “ HTTP/2 with keep-alive pings”

Configure HTTP/2 with keep-alive pings enabled for long-lived connections:

<Limits>
<Http2>
<MaxStreamsPerConnection>150</MaxStreamsPerConnection>
<KeepAlivePingDelay>00:01:00</KeepAlivePingDelay>
<KeepAlivePingTimeout>00:00:30</KeepAlivePingTimeout>
</Http2>
</Limits>

flask Conservative HTTP/2 limits

Section titled “ Conservative HTTP/2 limits”

Configure conservative HTTP/2 limits for resource-constrained environments:

<Limits>
<Http2>
<MaxStreamsPerConnection>50</MaxStreamsPerConnection>
<HeaderTableSize>4096</HeaderTableSize>
<MaxFrameSize>16384</MaxFrameSize>
<MaxRequestHeaderFieldSize>4096</MaxRequestHeaderFieldSize>
<InitialConnectionWindowSize>65536</InitialConnectionWindowSize>
<InitialStreamWindowSize>65536</InitialStreamWindowSize>
</Http2>
</Limits>
© 2026 Volue.Version v0.6.38017 November 2026