By default there is no seamless deployment on Heroku. That means, if you do a git push, your app gets deployed and there is a little downtime. That’s just because how Heroku works. At first they kill your running dynos, then they build the new app, deploy it on new dynos and finally boot up the new dynos.
But there is a new “preboot” feature in the Heroku labs. With that the procedure looks like that:
- Code push
- Run buildpack; store slug
- Boot new dynos
- Switch routing
- Kill old dynos
With that “preboot” Feature you don’t have any down times. You can activate the “preboot” feature for your app with this command:
heroku labs:enable -a myapp preboot
Now you can directly do “git push heroku master” and 3 minutes later your new version is online without any downtimes. I just tried it for VersionEye and it works perfectly for me.
That also means that there 2 different versions of the app online for round about 2 minutes. There is a short overlap for a short amount of time. That can be dangerous if you do big db migrations. For this kind of deployments you should disable the feature with
heroku labs:disable -a myapp preboot