7

We're currently running a Ruby on Rails project (RefineryCMS) on Heroku with two dynos.

Every time we update the site we experience downtime for about 1 to 2 minutes. Management are not happy about this.

What we'd really like is some sort of (transparent) Blue-Green Deployment: http://martinfowler.com/bliki/BlueGreenDeployment.html

Is this possible to achieve on Heroku or another cloud platform as a service?

We're also using Unicorn, but happy to change if necessary.

Charles
  • 50,943
  • 13
  • 104
  • 142
gef
  • 7,025
  • 4
  • 41
  • 48

2 Answers2

12

Heroku don't support Blue/Green deployment.

I open an issue on that to Heroku support and they reply that Cedar stack wasn't designed for that. So you can't really prevent downtimes

The preboot feature will not help you if your application failed to start(due to config issue or large migration at part of the start-up phase).

lielran
  • 189
  • 1
  • 9
  • 1
    This should be the accepted answer! Preboot on Heroku doesn't allow you to test the new release before it goes live (e.g making an HTTP request of the prebooting dynos). – André Freitas Oct 19 '17 at 16:08
  • I agree with Andre and this should be the accepted answer. – Vaibhav Sharma Jan 11 '19 at 11:35
  • 1
    I think the other answer wound up being accepted because ultimately the OP was looking for a way to remove the downtime, and didn't necessarily want blue/green if there was another way to avoid the downtime. Perhaps the title of the question should be changed? – jefflunt Sep 30 '19 at 18:45
6

Have a look at Heroku pre-boot it's a labs feature but sounds like exactly what you need.

Damax
  • 1,497
  • 19
  • 28
John Beynon
  • 37,398
  • 8
  • 88
  • 97
  • +1 Many thanks John :) I'll mark this as the marked answer if it works :D – gef Mar 20 '13 at 13:32
  • Finally had a chance to give this a go, and it worked a treat :D – gef Apr 29 '13 at 16:59
  • 1
    It's finally come out of 'labs feature' & is now 'generally available' - https://devcenter.heroku.com/articles/preboot – gef Oct 28 '14 at 17:18