[Solved] How to run asp.net core application is work with all web server? Is that reason Kestrel?


How to asp.net core application be cross platform?

It’s common that an application needs a runtime. Java, JS, Python, … you always need something on the target system to make your app work. For asp.net core it’s the asp.net core runtime and this runtime is available for many platforms. That’s why you can run your app on all of these platforms. See https://dotnet.microsoft.com/download/dotnet-core/2.2 for available packages.

Is that reason kestrel?

Kestrel is the web server part. (If you write a command line app, you don’t need kestrel). You can compare it with e.g. Tomcat in Java.

I think web server take request and send to Kestrel bla bla.

In most situations (except very small setups) we always have a proxy (web) server that takes the request and forwards it to another web server. While both seem to be very similar they have different roles.

Common (but just an example) setup:

  • Proxy (web) server: Terminate TLS, load balance to multiple backend web servers.
  • Backend (web) server: Run the application. But focus on this part. No TLS certs to configure, easy to scale,…

Why them need to Kestrel?

Again while some languages / frameworks use modules for existing servers (e.g. PHP) others use separate servers (Java, JS, C#, …). For c# it’s the kestrel web host.

3

solved How to run asp.net core application is work with all web server? Is that reason Kestrel?