Windows与Linux上的.net Core

编程入门 行业动态 更新时间:2024-10-11 17:25:31
本文介绍了Windows与Linux上的 Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

本文发布于:2023-06-11 00:12:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/621985.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Linux   Windows   Core   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!