Skip to content

Commit 29d1252

Browse files
committed
RavenDB-25067 - Document HTTP/2 flow control configuration options
1 parent 9004ec8 commit 29d1252

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

docs/server/configuration/http-configuration.mdx

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ import LanguageContent from "@site/src/components/LanguageContent";
2626
* [Http.Http2.KeepAlivePingTimeoutInSec](../../server/configuration/http-configuration.mdx#httphttp2keepalivepingtimeoutinsec)
2727
* [Http.Http2.KeepAlivePingDelayInSec](../../server/configuration/http-configuration.mdx#httphttp2keepalivepingdelayinsec)
2828
* [Http.Http2.MaxStreamsPerConnection](../../server/configuration/http-configuration.mdx#httphttp2maxstreamsperconnection)
29+
* [Http.Http2.Profile](../../server/configuration/http-configuration.mdx#httphttp2profile)
30+
* [Http.Http2.LatencyHint](../../server/configuration/http-configuration.mdx#httphttp2latencyhint)
31+
* [Http.Http2.InitialConnectionWindowSizeInKb](../../server/configuration/http-configuration.mdx#httphttp2initialconnectionwindowsizeinkb)
32+
* [Http.Http2.InitialStreamWindowSizeInKb](../../server/configuration/http-configuration.mdx#httphttp2initialstreamwindowsizeinkb)
33+
* [Http.Http2.MaxFrameSizeInKb](../../server/configuration/http-configuration.mdx#httphttp2maxframesizeinkb)
2934
* [Http.UseResponseCompression](../../server/configuration/http-configuration.mdx#httpuseresponsecompression)
3035
* [Http.AllowResponseCompressionOverHttps](../../server/configuration/http-configuration.mdx#httpallowresponsecompressionoverhttps)
3136
* [Http.GzipResponseCompressionLevel](../../server/configuration/http-configuration.mdx#httpgzipresponsecompressionlevel)
@@ -137,6 +142,102 @@ Set Kestrel's HTTP2 keep alive ping delay.
137142

138143

139144

145+
## Http.Http2.Profile
146+
147+
* Set the HTTP/2 performance profile that controls flow-control window sizes and max frame size.
148+
149+
* Profiles determine how aggressively HTTP/2 connections use memory to maximize throughput:
150+
151+
| Profile | Connection Window | Stream Window | Max Frame Size | Use Case |
152+
|---------|------------------|---------------|----------------|----------|
153+
| `Performance` | 32 MB | 4 MB | 1 MB | Maximize throughput, uses more memory |
154+
| `Balanced` | 16 MB | 2 MB | 256 KB | Good throughput without excessive memory |
155+
| `Conservative` | 4 MB | 1 MB | 16 KB | Lower memory, may cap throughput on high RTT |
156+
157+
* By default, the profile is set by the constructor of class `HttpConfiguration`
158+
(that is what is meant by the value `"DefaultValueSetInConstructor"`).
159+
64-bit runtimes default to `Balanced`. 32-bit runtimes default to `Conservative` to conserve address space.
160+
161+
- **Type**: `enum Http2Profile` (`Performance`, `Balanced`, `Conservative`)
162+
- **Default**: `DefaultValueSetInConstructor`
163+
- **Scope**: Server-wide only
164+
165+
166+
167+
## Http.Http2.LatencyHint
168+
169+
* Set a latency hint that influences how the selected profile's window sizes are applied.
170+
171+
* When set to `High`, the connection and stream window sizes derived from the selected profile are **doubled**
172+
to handle larger round-trip times on WAN or cross-region links.
173+
174+
* Use `High` when HTTP/2 throughput plateaus and improves after forcing HTTP/1.1 or increasing window sizes manually.
175+
176+
- **Type**: `enum Http2LatencyHint` (`Default`, `High`)
177+
- **Default**: `Default`
178+
- **Scope**: Server-wide only
179+
180+
| Value | Description |
181+
|-------|-------------|
182+
| `Default` | Low RTT — server and clients are collocated (same region/AZ). Uses profile window sizes as-is. |
183+
| `High` | WAN / cross-region — doubles the HTTP/2 flow-control windows to maintain throughput over larger RTTs. |
184+
185+
<Admonition type="note" title="">
186+
The latency hint does **not** affect explicit overrides set via
187+
`Http.Http2.InitialConnectionWindowSizeInKb` or `Http.Http2.InitialStreamWindowSizeInKb`.
188+
</Admonition>
189+
190+
191+
192+
## Http.Http2.InitialConnectionWindowSizeInKb
193+
194+
* **EXPERT**: Override the Kestrel HTTP/2 per-connection receive window size.
195+
196+
* Prefer using [Http.Http2.Profile](../../server/configuration/http-configuration.mdx#httphttp2profile) and
197+
[Http.Http2.LatencyHint](../../server/configuration/http-configuration.mdx#httphttp2latencyhint)
198+
unless you understand your bandwidth-delay product and memory tradeoffs.
199+
200+
* Values are clamped to the RFC 9113 legal range (64 KB – 2,147,483,647 bytes).
201+
202+
- **Type**: `int`
203+
- **Default**: `null` (determined by profile and latency hint)
204+
- **Scope**: Server-wide only
205+
- **Used for setting Kestrel property**: [InitialConnectionWindowSize](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.http2limits.initialconnectionwindowsize?view=aspnetcore-8.0)
206+
207+
208+
209+
## Http.Http2.InitialStreamWindowSizeInKb
210+
211+
* **EXPERT**: Override the Kestrel HTTP/2 per-stream receive window size.
212+
213+
* Prefer using [Http.Http2.Profile](../../server/configuration/http-configuration.mdx#httphttp2profile) and
214+
[Http.Http2.LatencyHint](../../server/configuration/http-configuration.mdx#httphttp2latencyhint)
215+
unless you are tuning for specific concurrency and RTT requirements.
216+
217+
* Values are clamped to the RFC 9113 legal range (64 KB – 2,147,483,647 bytes).
218+
219+
- **Type**: `int`
220+
- **Default**: `null` (determined by profile and latency hint)
221+
- **Scope**: Server-wide only
222+
- **Used for setting Kestrel property**: [InitialStreamWindowSize](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.http2limits.initialstreamwindowsize?view=aspnetcore-8.0)
223+
224+
225+
226+
## Http.Http2.MaxFrameSizeInKb
227+
228+
* **EXPERT**: Override the Kestrel HTTP/2 maximum frame payload size.
229+
230+
* Larger frames reduce per-frame overhead for bulk transfers but may delay small urgent frames.
231+
232+
* Values are clamped to the RFC 9113 Section 4.2 legal range (16 KB – 16 MB).
233+
234+
- **Type**: `int`
235+
- **Default**: `null` (determined by profile)
236+
- **Scope**: Server-wide only
237+
- **Used for setting Kestrel property**: [MaxFrameSize](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.http2limits.maxframesize?view=aspnetcore-8.0)
238+
239+
240+
140241
## Http.UseResponseCompression
141242

142243
* Set whether Raven's HTTP server should compress its responses.

0 commit comments

Comments
 (0)