IIS vs Kestrel performance comparison

I did quite a bit of benchmarking for my current project, hosting both .net core 1.0 and 2.0 apps on IIS and Kestrel. The tests were real-world rest-api CRUDs with authentication/authorization, logging, metrics, rate limiting etc. Also, .net core apps were done completely by the MS book, complying to recommended 1.0/2.0 standards.

With the same hardware setups, hosting behind IIS constantly served around 40% more requests per second. I'm still unable to find an article or a consultant who is able to explain the performance difference.

I also tried to find any sort of optimization tips from the core benchmarking authority https://github.com/aspnet/benchmarks, by rummaging through settings and service initializers, but still, IIS was just faster.

Any pointers?


Here is the XSLX file from the GitHub repo where you can see the performance comparisson you are looking for.

Open the file on Excel and check the "Latest" tab. enter image description here

Update: The excel file is no longer available and has been replaced with an interactive Power BI dashboard.


As of Nov 2016, straight from the ASP.NET benchmarks.

On Windows Server 2012, at a pipeline depth of 16:

stack        on       RT        requests/sec
ASP.NET 4.6  IIS      CLR           57,792 
ASP.NET 5    Kestrel  CoreCLR    1,188,521       

That's a 20x or 2000% speedup. I understand a full blown IIS vs standalong Kestrel but I do hope someone on the ASP.NET team can deep dive on this because the difference is tremendous.

That and why it's so much slower on Linux.

benchmark results