How to deploy an ASP.NET Application with zero downtime

You need 2 servers and a load balancer. Here’s in steps:

  1. Turn all traffic on Server 2
  2. Deploy on Server 1
  3. Test Server 1
  4. Turn all traffic on Server 1
  5. Deploy on Server 2
  6. Test Server 2
  7. Turn traffic on both servers

Thing is, even in this case you will still have application restarts and loss of sessions if you are using “sticky sessions”. If you have database sessions or a state server, then everything should be fine.

Leave a Comment