I have a RoR/Heroku app. Right now, my deploy process consists of checking in git, then running “git push heroku master”. Problem is, this introduces a lag of about 10 seconds where my live site goes down before coming back up. This causes existing visitors on the site to get frustrated and leave, if they happen to notice it.
So what is the best practice way to avoid that?
git push heroku master
I read about setting up a “staging” environment, but would that help avoid this? I’d still have to run a git push heroku master, wouldn’t I?
Heroku has a Labs feature that will pre-boot new dynos before shifting load from old dynos to new dynos. This way, new dynos will be fired up and ready when they start receiving requests and your users will see no delay when you update your app. Here’s how to enable pre-boot: