For the .NET Core 2.2 application deployed on a single AWS EC2 host I am comparing IIS hosting vs plain Kestrel hosting.
For IIS configuration I followed MS documentation.
For Kestrel I simply used:
dotnet app.dll --server.urls http://*:5000
I am running "stress" test with JMeter in order to compare throughput. This test is simply calling app's endpoint with 100 threads for 10 seconds duration (5 seconds warmup). Note, that endpoint is basically getting same data from MSSQL Server database on each call, no caching etc.
As a result, Kestrel fails 75% of requests with socket closed/timeout errors:
QUESTION: What kind of configuration error can lead to such Kestrel behavior? I've tried to use a basic nginx reverse proxy in front of Kestrel, but still getting the same results.