T
T
Taras252021-06-06 11:52:10
.NET
Taras25, 2021-06-06 11:52:10

Kestrel on a production server - no alternatives?

I read an opinion yesterday in the comments on Habré - that Kestrel is an inevitability and it is impossible to do without it.
But let me... Why?
What function does it perform? You can’t let it outside, there must be nginx. So why do you need Kestrel then? What is the sacred meaning? Both nginx and Kestrel are web servers. They are sometimes even compared.
But nginx is an orders of magnitude more reliable and proven server, with a bunch of plugins and settings. While Kestrel is just some kind of craft, albeit a good one, but on a combat server in a high-loaded project, is it really necessary to leave it?
What role does it play and why is it impossible to do without it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-06-06
@vabka

You can’t let it outside, it must be nginx

Actually, you can.
It's just that there may be difficulties with load balancing and caching.
Both nginx and Kestrel are web servers. They are sometimes even compared.

Yes, only kestrel is an embeddable web server. Like netty and jetty from java, or http stack from nodejs and go.
But nginx is an orders of magnitude more reliable and proven server, with a bunch of plugins and settings.

I wonder how you calculated orders of magnitude higher reliability?)
Plugins and settings in kestrel are also in bulk, only there all the settings are done by code.
What role does it play and why is it impossible to do without it?

If you omit the option with IIS, then kestrel is basically the only available option, because nginx simply does not know how to communicate directly with aspnet.
There is no CGI in dotnet, and thank God
If without kestrel, then there is another option with http.sys on Windows
PS: a page from the documentation about when it is worth using kestrel with nginx, and when you can get by with one kestrel:
https://docs. microsoft.com/en-us/aspnet/core/funda...
Briefly: you can not take a reverse proxy, but then you will lose a little in flexibility, for example, it will not be possible to keep several sites on one port.

V
Vladimir Korotenko, 2021-06-06
@firedragon

This is similar to phpfastcgi. By the way, this is not the only way you can use others. On the same windows it is better to use iis

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question