Avoid downtime with resilient Beanstalk deployments, including database patches?

I have read AWS docs regarding Deploying Zero Downtime Versions , and Replacing CNAME.

As yegor256 explains this in this answer :

The only thing he does is just exchange two CNAMEs. For example, you have one foo-1 environment with CNAME foo-1.example.com and another foo-2 with CNAME foo-2.example.com. After the working paging environment foo-1 responds to http://foo-2.example.com .

So, the problem is that you do not immediately change all traffic, but only new traffic. Existing traffic will continue to use the previous CNAME record until the TTL, making two versions coexist for this short period of time (300 seconds or more according to Arun Kumar ).

This seems acceptable to me when two versions of the application may come into contact .

However, some editions of our application include database patches, which should be launched immediately after the removal of the old version and immediately before the introduction of the new version.

So, it looks like the CNAME exchange is not good enough for what we are doing, as the old version of the application will break after the database is fixed.

Ideally, I would like to:

  • Always keep the same elastic load balancer
  • For Elastic Beanstalk, download one or more instances with the new version of the application
  • Remove existing instances (with old version of application) from ELB
  • Freeze database
  • Add newly downloaded instances (with the new version of the application) to ELB

This will minimize downtime by only a few seconds of the 503 Service Unavailable only when patches are applied.

Is it possible? Or didn’t I see the whole picture correctly, and did I miss a simpler solution?

+8
elastic-beanstalk
source share
1 answer

Here are a few other strategies you can use for deploying zero downtime on Elastic Beanstalk: http://www.hudku.com/blog/demystified-zero-downtime-with-amazon/

+1
source share

All Articles