Search code examples
c#asp.net-coreherokudevops

What is the simplest way to make a Heroku application live even during deployment


Currently, I maintain an application hosted on Heroku and I face the problem of downtime every time I perform a deploy. I would like to find a solution to prevent the application from being unavailable during this process. Is there any way to deploy without causing service interruptions, ensuring that the application is always online?

It's an asp.net mvc application running in a container


Solution

  • There's no easy way to completely eliminate this. At the very least, you need to synchronize database changes (ideally by running migrations) and code changes.

    One strategy to minimize downtime is to set up a pipeline. You can deploy to your staging environment, during which time your production environment remains active. Then, once you've done a sanity check on your staging environment, you can promote it to production, which reuses the existing application slug and is therefore much faster than rebuilding.