Kestrel Web Server & Reverse Proxy in ASP.NET Core

Menka Chaugule
3 min readMay 25, 2020

--

Hello friends..!!!In this article we are going to learn about Kestrel web server & Reverse Proxy concept in ASP.NET core.Before the main concept let’s first understand about web server.

Web server

Web server is a layer that accepts the browser requests and then pass the response to the browser.

There are two types of web server:

1.Internal

2.External

Kestrel web server is internal web server and IIS,Apache or Nginx can be external web servers in ASP.NET core.

What is Kestrel web server?

The kestrel is a cross-platform web server for the ASP.NET core application.it means this server supports all the platforms and versions that the ASP.NET core supports.

This web server directly processes the incoming HTTP request from the client and gives response.This combination of request and response is called as HTTP Context.

Why kestrel web server?

It allows ASP.NET Core applications to be run easily on other cross-platform web servers such as IIS, Apache and Nginx without the need of address varying startup configurations.

It can provide better request processing performance but its not a powerful front end server like IIS,Apache and Nginx. So Kestrel is always used with Reverse Proxy.

Kestrel web server can be used in two ways:

1.Edge web server - In this kestrel can be used by itself.No reverse proxy server are used in it.It directly receives requests from browser and give response back to it.

Edge web server

2.Reverse proxy server - In this kestrel is used with reverse proxy server which can be IIS,Apache or Nginx. A reverse proxy server receives HTTP requests from the browser and forwards them to kestrel.After that kestrel send response to reverse proxy server and reverse proxy server forward it to browser.

Kestrel with Reverse Proxy server

In your application by default “IIS Express” is set as web server,so it starts as a reverse proxy.But if you want to run your application from Kestrel web server then you have to select application name in run dropdown list.You can see in below window

In above window, “TestApp” is application name.After selection it will start the app directly from kestrel web server.

I hope you have understand about Kestrel web server and Reverse Proxy concept.To learn more must watch the below video:

Thanks for reading..!!!

--

--