dotnet / dotnet/aspnetcore

Tune Window Update batching algorithm

Open
#4,734 5 comments 0 reactions 0 assignees View on GitHub
affected-very-few area-networking enhancement feature-kestrel HTTP2 Perf severity-nice-to-have
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

Http2 request data flow control needs to periodically send window updates for both the stream and connection to inform the client they're allowed to send more data. The current algorithm uses a minWindowSizeIncrement to prevent sending updates too frequently. The default for this value is 32kb, half of the total window size of 64kb. That seems too large when most of HTTP/2 is over TLS and TLS frame sizes are limited to 16kb. We also plan to provide settings to raise the window size and may even set the default higher.

Proposals:
- Make initial window size and minWindowSizeIncrement independently configurable.
- Run perf tests with different window sizes with particular attention to the TLS frame size.
- Make sure the perf tests include variable levels of latency. High latency and infrequent window updates will cause significant jitter in the throughput.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.