ASP.Net Core 可在 Windows 和 Linux Docker 容器上运行.考虑到 Linux 主机比 Windows 主机便宜,如果不需要完整的 .Net 框架,在 IIS/Windows 和 Nginx/Linux 上运行你的应用有什么好处?
ASP.Net Core runs on both Windows and Linux Docker containers. Considering Linux hosts are cheaper than Windows hosts, what is the benefit of running your app on IIS/Windows vs Nginx/Linux if one doesn't require the full .Net framework?
推荐答案A Roberto Prevato 的研究 表明您最好在 Linux (!) 上运行它,至少对于 ASP.NET Core.
A study by Roberto Prevato suggests that you'll be better off running it on Linux (!), at least for ASP.NET Core.
结果与从发电机获得的产生负载的结果一致通过电线连接到互联网的计算机:相同的 ASP.NET Core部署在 Linux 和 Docker 中的应用程序比一个快得多部署在 Windows 主机中(均在应用程序服务计划内).这些新测试显示托管在Linux,尤其是在响应具有更大主体的响应时.
Results are consistent with those obtained generating load from a computer connected through wire to the internet: the same ASP.NET Core application deployed in Linux and Docker is much faster than one deployed in Windows host (both inside Application Service Plan). These new tests show an even stronger dominance of the application hosted in Linux, especially when serving responses with bigger bodies.
他得到的结果的简短摘要:
A short summary of the results he got:
每秒请求数(越高越好):
Scenario Linux Windows +% Hello World 646.6 432.85 +49.38% 1KB 623.05 431.95 +44.24% 10KB 573.6 361.9 +58.5% 50KB 415.5 210.05 +97.81% 100KB 294.35 143.25 +105.48%响应时间(越低越好):
Scenario Linux Windows -% Hello World 168.85 242.2 -30.28% 1KB 171.25 249.8 -31.45% 10KB 184.2 292.7 -37.07% 50KB 233.3 542.85 -57.02% 100KB 365.05 817.35 -55.34%更多推荐
Windows 和 Linux 上的 .net Core
发布评论