4
votes

I read this fantastic article by Rick Strahl. It says Microsoft after DotNet core 2.2 decided to add InProcess Mode to use directly IIS to process request instead of using OutOfProcess which handle process using Kestrel web server. We know that in this mode IIS is used as a reverse webserver proxy to get a request and take it to kestrel.

  <!-- hostingModel is the new property here -->
  <aspNetCore processPath="dotnet" arguments=".\WebApplication1.dll"    
              stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
              hostingModel="InProcess" />

Then Rick Strahl in his article compares InProcess Mode and OutOfProcess mode and get the result that using IIS directly without Kestrel (InProcess Mode) takes a much faster process. (Even he proves IIS has more speed with raw kestrel)

With this result, I am wondering why do we have Kestrel yet? Just for using our DotNet core application in front of other revers Web servers such as Apache Nginx and...? or there is some other scenario that using OutOfProcess would be useful? I simple words why do we should use both (IIS + Kestrel)

1

1 Answers

3
votes

IIS is the only server that can host .NET directly (in process). But what about all the cross-platform servers that are not IIS?

If I am running Linux (which, to be honest, most of the cloud is, even Microsoft), what do I use?

That's why we need something that is standalone such as Kestrel.

Also, in recent versions, Kestrel (and ASP.NET Core and .NET Core) have gotten much faster. The TechEmpower benchmark currently shows that ASP.NET Core, running with Kestrel, is tied for the fastest framework in the "Plaintext" benchmark.

https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext