Kestrel

Kestrel is the default web server included in ASP.NET | Open-source web framework for .NET Core project templates.

Kestrel can be used:

By itself as an edge server processing requests directly from a network, including the Internet.

With a reverse proxy server, such as Internet Information Services (IIS), Nginx, or Apache. A reverse proxy server receives HTTP requests from the Internet and forwards them to Kestrel.

Either hosting configuration—with or without a reverse proxy server—is supported for ASP.NET | Open-source web framework for .NET Core 2.1 or later apps.

For Kestrel configuration guidance and information on when to use Kestrel in a reverse proxy configuration, see Kestrel web server implementation in ASP.NET Core.

Nginx with Kestrel

For information on how to use Nginx on Linux as a reverse proxy server for Kestrel, see Host ASP.NET Core on Linux with Nginx.

Apache with Kestrel

For information on how to use Apache on Linux as a reverse proxy server for Kestrel, see Host ASP.NET Core on Linux with Apache.

IIS HTTP Server

IIS HTTP Server is an in-process server for IIS and required for in-process deployments. The ASP.NET Core Module handles native IIS requests between IIS and IIS HTTP Server. For more information, see ASP.NET Core Module.

HTTP.sys

If ASP.NET | Open-source web framework for .NET Core app is run on Windows, HTTP.sys is an alternative to Kestrel. Kestrel is generally recommended for the best performance. HTTP.sys can be used in scenarios where the app is exposed to the Internet and required capabilities are supported by HTTP.sys but not Kestrel. For more information, see HTTP.sys web server implementation in ASP.NET Core.

HTTP.sys can also be used for apps that are only exposed to an internal network.

For HTTP.sys configuration guidance, see HTTP.sys web server implementation in ASP.NET Core.

ASP.NET | Open-source web framework for .NET Core server infrastructure

The IApplicationBuilder was available in the Startup. The configure method exposes the ServerFeatures property of type IFeatureCollection. Kestrel and HTTP.sys only expose a single feature each, IServerAddressesFeature, but different server implementations may expose additional functionality.

IServerAddressesFeature can be used to find out which port the server implementation has bound at runtime.

Custom servers

If the built-in servers don't meet the app's requirements, a custom server implementation can be created. The Open Web Interface for .NET (OWIN) guide demonstrates how to write a Nowin-based IServer implementation. Only the feature interfaces that the app uses require implementation, though at a minimum IHttpRequestFeature and IHttpResponseFeature must be supported.

Server startup

The server is launched when the Integrated Development Environment (IDE) or editor starts the app:

When launching the app from a command prompt in the project's folder, dotnet run launches the app and server (Kestrel and HTTP.sys only). The configuration is specified by the -c|--configuration option, which is set to either Debug (default) or Release. If launch profiles are present in a launchSettings.json file, use the --launch-profile <NAME> option to set the launch profile (for example, Development or Production). For more information, see dotnet run and .NET Core distribution packaging.

HTTP/2 support

HTTP/2 is supported with ASP.NET | Open-source web framework for .NET Core in the following deployment scenarios:

KestrelOperating system Windows Server 2016/Windows 10 or later†Linux with OpenSSL 1.0.2 or later (for example, Ubuntu 16.04 or later)HTTP/2 will be supported on macOS in a future release.Target framework: .NET Core 2.2 or later

HTTP.sysWindows Server 2016/Windows 10 or laterTarget framework: Not applicable to HTTP.sys deployments.

IIS (in-process)Windows Server 2016/Windows 10 or later; IIS 10 or laterTarget framework: .NET Core 2.2 or later

IIS (out-of-process)Windows Server 2016/Windows 10 or later; IIS 10 or laterPublic-facing edge server connections use HTTP/2, but the reverse proxy connection to Kestrel uses HTTP/1.1.Target framework: Not applicable to IIS out-of-process deployments.

Kestrel has limited support for HTTP/2 on Windows Server 2012 R2 and Windows 8.1. Support is limited because the list of supported TLS cipher suites available on these operating systems is limited. A certificate generated using an Elliptic Curve Digital Signature Algorithm (ECDSA) may be required to secure TLS connections.

Thanks :)