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?
推荐答案一个研究建议您最好在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.
结果与从 通过电线连接到Internet的计算机:相同的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
发布评论