3

在各种技术博客/网站上,使用 asp.net 核心引入的新 Web 服务器红隼比 IIS 具有性能优势,因为它使用基于单线程事件循环模型的 libuv 库。

如果我在 C# 中对 I/O 任务使用异步等待并使用 IIS 而不是 Kestrel,我无法理解这有何不同。由于 async await 也是一个非阻塞调用,所以我无法理解吞吐量/性能的好处。

请有人能用简单的话详细说明这一点。

我知道红隼是跨平台的,但我的查询是围绕我应该使用红隼获得的性能/吞吐量优势,所以如果我只针对 Windows,让我重新表述我的问题,使用红隼与 IIS 是否可以获得任何性能优势。我浏览过的大多数链接都指出 Kestrel 使用 libuv,因此它提供了一些性能优势,但没有详细说明它的不同之处,这使得它更快。如果我不使用任何 IIS 模块,那么性能是否具有可比性

4

1 回答 1

0

Whether to use the async / await keywoeds is not related to whether to use IIS or Kestrel.

IIS can only run on a Microsoft Windows Operating System - usually a Windows Server, but Windows 10, for example, can also run IIS.

Kestrel is a cross-platform web server that may be hosted behind IIS / Apache / etc. depending on the server operating system.

For a more indepth explanation of IIS & Kestrel as well as the cross platform opportunities, please see ASP.Net Core Web Servers and for a more detailed explanation of async / await, please try using async / await.

于 2018-04-29T15:32:42.510 回答