What is Kestrel in ASP.NET Core?

ASP.NET Core Hosting Basic 1–2 Yrs2–3 Yrs Conceptual 1 min read

Quick Answer

Kestrel is the default, cross-platform web server built into ASP.NET Core. It is a fast, lightweight HTTP server that listens for requests and hands them to your app's middleware pipeline. In production it is often placed behind a reverse proxy such as IIS, Nginx or YARP, but it can also be internet-facing on its own.

Kestrel is the web server that comes with ASP.NET Core. It's cross-platform and very fast, and it's what actually listens on the socket and passes requests into the middleware pipeline. You can run it on its own, but the common production setup is Kestrel behind a reverse proxy like IIS or Nginx, which handles TLS, host filtering and load balancing and then forwards to Kestrel. That separation is what lets the same app run on a dev machine, in a Linux container, or behind IIS on Windows without code changes.

Before Kestrel, ASP.NET was inseparable from IIS. Kestrel makes the app self-hosting: dotnet run starts an HTTP server on any OS. It is based on high-performance async I/O and is one of the reasons ASP.NET Core benchmarks so well.

Two common deployment shapes:

  • Kestrel behind a reverse proxy — IIS (via the ASP.NET Core Module), Nginx or Apache handles TLS termination, host headers, request filtering and load balancing, then forwards to Kestrel. This is the recommended default for internet-facing apps.
  • Kestrel edge / internet-facing — supported and common in containers and behind a cloud load balancer, where the platform already provides TLS and filtering.

You configure Kestrel endpoints, limits (max request body size, connection limits, timeouts) and HTTPS certificates in appsettings.json or code. IIS in this model runs in-process or out-of-process; in-process skips the extra network hop and is the default for IIS-hosted apps.