Which .net core 5 runtime is preferred x86 or x64?

Tanul 1,291 Reputation points
2021-01-06T12:48:06.017+00:00

Team,

Happy NewYear!

On my azure environment, I want to host .net core 5 rest api on this machine

Previous generation A-Series
53975-untitled.png

On this azure machine(part of my service plan) 4 other services are already running where in 1% CPU + 47.44% RAM is already consumed.

Need to add here that I have made this api on my local machine which has 64-bit OS with 8 GB ram.

Which .net core 5 environment should I install as extension in azure app service(32-bit or 64-bit).

Kindly suggest.

Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,043 questions
Developer technologies | ASP.NET | ASP.NET Core
Azure Stack Hub
Azure Stack Hub
An extension of Azure for running apps in an on-premises environment and delivering Azure services in a datacenter.
194 questions
Developer technologies | .NET | .NET Runtime
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,971 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 60,331 Reputation points
    2021-01-06T15:00:56.077+00:00

    Unless there is a reason not to I'd use x64. Gives you access to more memory if you need it. The cost should be the same as all the Azure App Services are 64-bit processors anyway. Compile your code as Any CPU and it run on either. The only time I'd probably drop down to x86 is if I needed to run software that wasn't supported on x64 (say native C++ code that only had x86 libraries).

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. KalyanChanumolu-MSFT 8,351 Reputation points
    2021-01-06T14:58:51.64+00:00

    @Tanul Thank you for reaching out.
    If you are running a 64-bit operating system, you should compile your code for 64-bit and use the 64-bit runtime.

    A major benefit of .Net core is that you don't need to install the runtime on your server.
    You can bundle it along with your application itself.

    Use the below command to generate a self contained app

    dotnet publish -r win-x64  
    

    Please let us know if you have further questions.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.