[英]HTTP.sys vs Kestrel: Why choose one over the other? Pros Cons?
What is the reason for two separate but similar servers?两个独立但相似的服务器的原因是什么? What are the differences?
有什么区别? Can I run both in docker?
我可以在 docker 中同时运行吗? Do both support same things, like all authentication types?
是否都支持相同的东西,比如所有的身份验证类型?
Kestrel vs HTTP.sys - I've highlighted the fundamental differences below. Kestrel 与 HTTP.sys - 我在下面强调了基本差异。
(The words are Microsoft's and I've only edited it for brevity and clarity. See the sources linked at the bottom). (这些词是微软的,我只是为了简洁和清晰起见对其进行了编辑。请参阅底部链接的来源)。
Kestrel previously always required the use of a reverse proxy with edge deployments (exposed to traffic from the Internet) for security reasons.出于安全原因,Kestrel 以前总是需要在边缘部署(暴露于来自 Internet 的流量)中使用反向代理。 With Kestrel in ASP.Net Core 2.x this is no longer the case.
使用 ASP.Net Core 2.x 中的 Kestrel,情况不再如此。 Take a look at the documentation for more information.
查看文档以获取更多信息。 Kestrel Web Server Documentation
Kestrel Web 服务器文档
Weblistener was renamed HTTP.sys in ASP.NET Core 2.0 Weblistener 在 ASP.NET Core 2.0 中更名为 HTTP.sys
HTTP.sys is windows-only HTTP / Web Server for ASP.NET Core that allows you to expose the server directly to the Internet without needing to use IIS. HTTP.sys是用于 ASP.NET Core的仅限 Windows 的HTTP/Web 服务器,它允许您将服务器直接公开到 Internet,而无需使用 IIS。 HTTP.sys is built on top of Http.Sys ( the same mature technology that also powers IIS' HTTP Listener) as is as such very feature rich and provides protection against various attacks .
HTTP.sys 建立在 Http.Sys(同样成熟的技术,也支持 IIS 的 HTTP 侦听器)之上,因此功能非常丰富,并提供对各种攻击的保护。
Kestrel on the other hand, is a cross-platform web server for ASP.NET Core that is designed to be run behind a proxy (for example IIS or Nginx) and should not be deployed directly facing the Internet .另一方面, Kestrel是 ASP.NET Core 的跨平台Web 服务器,旨在在代理(例如 IIS 或 Nginx)之后运行,不应直接面向 Internet 部署。 Kestrel is relatively new and does not have a full complement of defenses against attacks .
Kestrel 相对较新,没有完整的攻击防御措施。 It's also not as feature rich as HTTP.sys and comes with timeout limits, size limits and concurrent user limits.
它也没有HTTP.sys那样丰富的功能,并带有超时限制、大小限制和并发用户限制。
In essence, the choice comes down to your web application's Deployment scenario.本质上,选择归结为您的 Web 应用程序的部署方案。
The ASP.NET 5 documentation ( created by Microsoft on August 25, 2015 ) found here lists the chart found in the other answer (see page 107 of the bottom right book pages, but page 111 of the PDF): https://media.readthedocs.org/pdf/aspnet/theming/aspnet.pdf此处找到的 ASP.NET 5 文档(由 Microsoft 于 2015 年 8 月 25 日创建)列出了在另一个答案中找到的图表(参见右下书页的第 107 页,但 PDF 的第 111 页): https://media .readthedocs.org/pdf/aspnet/theming/aspnet.pdf
Kestrel in general has better performance, if you used for one of the following below:如果您用于以下其中一项, Kestrel通常具有更好的性能:
WebListener is more secure, slower, and has more features. WebListener更安全、更慢,并且具有更多功能。 It is used in these cases:
它用于以下情况:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.