HTTP/3 Hosting Limits Configuration
Configure the HTTP/3 specific protocol limits for the Kestrel web server.
For detailed information about HTTP/3 settings in .NET 8, see Kestrel HTTP/3 Support.
Configuration Path
Section titled “Configuration Path”HAKOM:TSM:Http:Hosting:Limits:Http3Configuration Structure
Section titled “Configuration Structure”As of .NET 8, the following options are available for Kestrel with HTTP/3:
Http3├─ MaxRequestHeaderFieldSectionSize├─ HeaderTableSize└─ MaxRequestHeaderFieldSizeConfiguration Elements
Section titled “Configuration Elements”| Element | Type | Default | Required | Description |
|---|---|---|---|---|
MaxRequestHeaderFieldSectionSize |
int |
8192 |
The maximum size of the entire request header section in bytes (8 KB). | |
HeaderTableSize |
int |
4096 |
The maximum size of the header compression table (QPACK) in bytes (4 KB). | |
MaxRequestHeaderFieldSize |
int |
8192 |
The maximum size of a single request header field in bytes (8 KB). |
Understanding HTTP/3 Settings
Section titled “Understanding HTTP/3 Settings”Header Compression
Section titled “Header Compression”HTTP/3 uses QPACK (QPACK: Header Compression for HTTP/3) for header compression, which is different from HTTP/2’s HPACK compression.
HeaderTableSize: Controls the QPACK dynamic table size. Larger values can improve compression efficiency for connections with repetitive headers but use more memory per connection.MaxRequestHeaderFieldSize: Limits individual header field sizes to prevent resource exhaustion attacks. This includes both the header name and value.MaxRequestHeaderFieldSectionSize: Limits the total size of all headers in a request. This is the sum of all header field sizes (names + values).
HTTP/3 Protocol Notes
Section titled “HTTP/3 Protocol Notes”HTTP/3 uses QUIC as the transport protocol instead of TCP. This has several implications:
- Connection Migration: HTTP/3 connections can survive network changes (e.g., switching from Wi-Fi to cellular).
- Improved Multiplexing: HTTP/3 eliminates head-of-line blocking at the transport layer.
- Built-in Encryption: QUIC has TLS 1.3 encryption built into the protocol.
Examples
Section titled “Examples”The following examples show the Http3 section within HAKOM:TSM:Http:Hosting:Limits.
Basic HTTP/3 configuration
Section titled “ Basic HTTP/3 configuration”Configure HTTP/3 settings with increased header limits:
<Limits> <Http3> <MaxRequestHeaderFieldSectionSize>16384</MaxRequestHeaderFieldSectionSize> <HeaderTableSize>8192</HeaderTableSize> <MaxRequestHeaderFieldSize>16384</MaxRequestHeaderFieldSize> </Http3></Limits>Conservative HTTP/3 limits
Section titled “ Conservative HTTP/3 limits”Configure conservative HTTP/3 limits for resource-constrained environments:
<Limits> <Http3> <MaxRequestHeaderFieldSectionSize>4096</MaxRequestHeaderFieldSectionSize> <HeaderTableSize>2048</HeaderTableSize> <MaxRequestHeaderFieldSize>4096</MaxRequestHeaderFieldSize> </Http3></Limits>High-throughput HTTP/3 configuration
Section titled “ High-throughput HTTP/3 configuration”Configure HTTP/3 settings for applications with large headers:
<Limits> <Http3> <MaxRequestHeaderFieldSectionSize>32768</MaxRequestHeaderFieldSectionSize> <HeaderTableSize>16384</HeaderTableSize> <MaxRequestHeaderFieldSize>32768</MaxRequestHeaderFieldSize> </Http3></Limits>Important Notes
Section titled “Important Notes”Was this page helpful?Thanks for your feedback!