Skip to content

HTTPs and "Connection: close" - huge performance degradation on windows #18488

@surr34

Description

@surr34

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.

Metadata

Metadata

Assignees

Labels

affected-very-fewThis issue impacts very few customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-kestrelseverity-majorThis label is used by an internal tool

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions