.net Core for Windows vs Linux

ASP.Net Core runs on both Windows and Linux Docker. Given that Linux hosts are cheaper than Windows hosts, what is the advantage of running your application on IIS / Windows versus Nginx / Linux if you do not need a complete .NET infrastructure.

+5
source share
2 answers

A study by Roberto Prevato suggests that you will be better off working with it in Linux (!), At least for the ASP.NET kernel.

The results are consistent with the derived loads from a computer connected through a wire to the Internet: the same ASP.NET Core application deployed on Linux and Docker is much faster than one deployed on a Windows host (as inside the Application Service Plan). These new tests show even more dominance of an application hosted on Linux, especially when submitting responses with larger bodies.

A brief overview of the results:

Requests per second:

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% 

Response time:

 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% 
+3
source

There is no clear advantage. This is the same argument why you want to run rails, jboss, on other platforms. Since you are using the same application, there are not many considerations for accounting. There are features in windows that you might want, such as DNS caching. If you prefer to use a web listener rather than a kestrel, but this should largely depend on what you are doing.

If you really care about your HTTP ports or which timezone database will use, you can make this determination. For most users, there is no significant advantage. If you want to have an AD login, you pretty much have to use windows and IIS, since you need a server that is part of the active directory domain.

Just remember that linux has a free option, but most paid enterprise support for Linux is usually the same, if not more expensive than windows.

0
source

Source: https://habr.com/ru/post/1268483/


All Articles