Sana.91
Sana.91

Reputation: 2249

.NET Core and Kestrel - What should be reverse proxy web server for ASP.NET CORE web api app deployed at linux?

It is advised to use kestrel with a reverse proxy for production for many reasons listed below (documented at microsoft)

A reverse proxy can:

  1. Can limit the exposed public surface area of the apps that it hosts.

  2. Provide an additional layer of configuration and defense.

  3. Might integrate better with existing infrastructure.
  4. Simplify load balancing and secure communication (HTTPS) configuration. Only the reverse proxy server requires an X.509 certificate, and that server can communicate with the app's servers on the internal network using plain HTTP.

IIS cant be used at Linux, and IIS is considered to be fastest as compared to NGINX or others according to benchmarks.

Since my app needs to be deployed at Linux ...

1) what will be the best web server to use for best performance of my app that can handle multiple concurrent connections well and provides configurations for defense? ..

2) Is it that kestrel alone will give best performance? If yes, then how can i ensure defense of app in accordance with many of features that IIS have but kestrel doesn't like: Request Filtering & Limits

Upvotes: 6

Views: 4254

Answers (2)

Dasith Wijes
Dasith Wijes

Reputation: 1358

If you want to go with Apache this might be of help https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-3.1

But NGINX outperforms it in synthetic benchmarks https://theorganicagency.com/blog/apache-vs-nginx-performance-comparison/

Upvotes: 1

Ziaullah Khan
Ziaullah Khan

Reputation: 2244

I've used nginx and haproxy both. I've read articles on Microsoft docs for Nginx:

Sharing the link here: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1


Upvotes: 2

Related Questions