Reputation: 2249
It is advised to use kestrel with a reverse proxy for production for many reasons listed below (documented at microsoft)
A reverse proxy can:
Can limit the exposed public surface area of the apps that it hosts.
Provide an additional layer of configuration and defense.
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
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
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