-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
We have a Kestrel service that recently receives a lot of https requests containing a Connection: close header. It seems the header has a massive impact on the number of requests we can handle. Testing with a simple service locally, the RPS drops from over 30k to under 500.
For testing purpose we ran the same service on Linux and implemented it in NodeJS as well. While the C# version on Windows was fast for kept-alive connections, the performance degradation was huge. Using Connection: close, the C# Windows version was outperformed by both NodeJS and the C# implementation on a Linux system. Based on other Github issues I believed the Windows version to be way faster than the Linux one. However below the number (RPS) we measured
| keep-alive | close | |
|---|---|---|
| Kestrel (win) | 54641 | 349 |
| Node (win) | 10422 | 2256 |
| Kestrel (Linux) | 51490 | 2339 |
| Node (Linux) | 37504 | 2095 |
For the Kestrel Windows version we also noticed a significant spike in the CPU consumption of the lsass process.