-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Document MinResponseDataRate transport buffer limitation #64743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Greetings! You've submitted a PR that modifies code that is shared with https://github.com/dotnet/runtime . Please make sure you synchronize this code with the changes in that repo! |
…mark Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
src/Servers/Kestrel/Core/src/Features/IHttpMinResponseDataRateFeature.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds documentation to clarify a key limitation of the MinResponseDataRate feature in Kestrel. The feature measures data written from the server's perspective, not actual client consumption, because the transport reads data from the application until OS buffers are full. This clarification helps developers understand why the rate may not accurately reflect client read behavior when diagnosing slow client scenarios.
Key Changes:
- Added XML documentation remarks explaining the OS buffer limitation to
KestrelServerLimits.MinResponseDataRate - Added identical documentation to
IHttpMinResponseDataRateFeature.MinDataRatefor consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Servers/Kestrel/Core/src/KestrelServerLimits.cs | Added paragraph in remarks section explaining that MinResponseDataRate may not accurately measure client read rate due to OS buffer behavior |
| src/Servers/Kestrel/Core/src/Features/IHttpMinResponseDataRateFeature.cs | Added remarks section with the same OS buffer limitation explanation for the per-request feature interface |
Document MinResponseDataRate transport buffer limitation
Clarify MinResponseDataRate behavior regarding OS buffer mechanics
Description
MinResponseDataRate measures data written from the server's perspective, not actual client consumption. Added remarks to XML documentation explaining that the rate may not accurately reflect how much data a client is reading because the transport reads data until OS buffers are full.
Updated locations:
KestrelServerLimits.MinResponseDataRatepropertyIHttpMinResponseDataRateFeature.MinDataRatepropertyThis clarifies expected behavior when diagnosing slow client scenarios where OS buffers mask the actual consumption rate.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.