Dotnet self hosted deployment?


Hello fellow dotnet (core) coders,

My company is going to make a new project (monolith web app) with 20+ devs.
Now we are discussing dotnet core vs php. They see the easy “file copy/replace deployment” of php with zero downtime as a killer argument. Can we deploy dotnet core in a self hosted linux environment with zero downtime, too? Thx in advance!

I like how no one suggests Docker and a LoadBalancer… or did all of you move into the clouds?


When anybody has the same problem… here is one answer to this:



Yes, you can use what Martin Fowler call "Blue Green Deploymentt"
(using 2 app instances and a reverse proxy)


Does your team intend to manually deploy PHP files to the production server? Unless every edit is contained to one file, that seems like an easy way to introduce bugs or flakiness for your users. Setting up a CI pipeline to automatically deploy changes after your build/lint/tests all pass will probably prevent a lot of headaches in the future.

Setting up two instances of your web app and using a reverse proxy to migrate traffic is the right approach, and hopefully is easy to set up in your cloud environment. (Zero downtime is also impossible to achieve if you’re relying on a single server to never crash or need to go down for maintenance. If you want guaranteed high availability, you’ll need to set up multiple servers in different cloud regions.)

If you’re hosting on Azure, I’d look into Staging Environments and Deployment spots

.NET Foundation Website | Blog | Projects | Code of Conduct