Describe the bug
Adding Limits.MinRequestBodyDataRate = null configuration to kestrel server will add ~40ms to response time when connection using .net framework client.
This doesn't reproduce when:
- using .net core client.
- both server & client are localhost
To Reproduce
Make sure running the server app on other host then the client app, or access the server app from the client via internet (open 5000 port and use public ip).
- Download the server side app: WebApplicationServer.zip, extract and open
.sln file in VS.
- Publish and run the
WebApplicationServer.exe file.
- Download the client side app WebApplication1.zip, extract, open
.sln file in VS and build the project.
- Go to line 61 in
Controllers/HomeController.cs and change the url variable to the WebApplicationServer app url and run
- In the running client app, go to the Query page, you should get similar results:
round: 0, elapsed: 459 ms
round: 1, elapsed: 41 ms
round: 2, elapsed: 41 ms
round: 3, elapsed: 41 ms
round: 4, elapsed: 42 ms
round: 5, elapsed: 41 ms
round: 6, elapsed: 41 ms
round: 7, elapsed: 42 ms
round: 8, elapsed: 41 ms
round: 9, elapsed: 40 ms
round: 10, elapsed: 41 ms
Max: 42 ms, min: 40 ms
Last 10 average: 79.09 ms, overall average: 79.09 ms
- Close
WebApplicationServer.exe, open back the WebApplicationServer app in VS.
- Comment line 20 in
Program.cs, publish and run the WebApplicationServer.exe.
- Go back to the client, refresh the Query page, you should get similar results:
round: 0, elapsed: 149 ms
round: 1, elapsed: 3 ms
round: 2, elapsed: 1 ms
round: 3, elapsed: 1 ms
round: 4, elapsed: 1 ms
round: 5, elapsed: 1 ms
round: 6, elapsed: 1 ms
round: 7, elapsed: 1 ms
round: 8, elapsed: 1 ms
round: 9, elapsed: 1 ms
round: 10, elapsed: 1 ms
Max: 3 ms, min: 1 ms
Last 10 average: 14.64 ms, overall average: 14.64 ms
Further technical details
- ASP.NET Core 3.1.3
- output of
dotnet --info
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.201\
Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8
.NET Core SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
3.1.102 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
- The IDE is VS 2019, version 16.5.4
Describe the bug
Adding
Limits.MinRequestBodyDataRate = nullconfiguration to kestrel server will add ~40ms to response time when connection using.net frameworkclient.This doesn't reproduce when:
To Reproduce
Make sure running the server app on other host then the client app, or access the server app from the client via internet (open 5000 port and use public ip).
.slnfile in VS.WebApplicationServer.exefile..slnfile in VS and build the project.Controllers/HomeController.csand change the url variable to theWebApplicationServerapp url and runWebApplicationServer.exe, open back theWebApplicationServerapp in VS.Program.cs, publish and run theWebApplicationServer.exe.Further technical details
dotnet --info