Zero Downtime Deployments on Beanstalk
As we are winding down the RUN@cloud service - some users have been migrating to Amazon's Elastic Beanstalk - for a PaaS like experience but on their own Amazon account.
RUN@cloud gave you out of the box "zero downtime" deployments (which worked well for fast starting apps) but there was also "blue green" deployment for more advanced warming up of new deployments.
With Elastic Beanstalk - people have asked about the same experience. By default beanstalk deploys updates in place - which can result in short outages. To avoid this and get closer to what RUN@cloud had as for zero downtime deployments - enable rolling updates (see here for more):
Firstly, go to the configuration for the web tier of your beanstalk app:
In the bottom right - click on the little cog icon:
Tick on "rolling configuration updates" - and then you can choose to have it replace one at a time.
The load balancer will ensure that traffic only goes to an app server that is running. This requires you to have multiple instances running of course, there is no way around that (on RUN@Cloud we started up other instances pre-emptively, so slightly different).
There are other options, however, amazon have a guide here to do what is effectively a blue green deployment - it is fairly involved but very powerful.
Other options are to run 2 completely separate environments that you alternately deploy to on beanstalk, and have a proxy entirely outside of AWS that directs traffic accordingly (something like cloudflare may be able to do it - but I haven't tried this approach specifically).
Stay up to date
We'll never share your email address and you can opt out at any time, we promise.