AWS Certified DevOps Engineer - Professional Exam: Elastic Beanstalk Deployment Strategy for Least Downtime

Elastic Beanstalk Deployment Strategy for Least Downtime

Prev Question Next Question

Question

You are currently using Elastic Beanstalk to host your production environment.

You need to roll out updates to your application hosted on this environment.

This is a critical application which is why there is a requirement that the rollback, if required, should be carried out with the least amount of downtime.

Which of the following deployment strategies would ideally help achieve this purpose?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - C.

Since the requirement is to have the least amount of downtime, the ideal way is to create a blue-green deployment environment and then use the Swap URL feature to swap environments for the new deployment and then do the swap back, in case the deployment fails.

The AWS Documentation mentions the following on the SWAP URL feature of Elastic Beanstalk.

Because Elastic Beanstalk performs an in-place update when you update your application versions, your application may become unavailable to users for a short period of time.

It is possible to avoid this downtime by performing a blue/green deployment, where you deploy the new version to a separate environment and then swap CNAMEs of the two environments to redirect traffic to the new version instantly.

To achieve minimum downtime while deploying updates to the critical application hosted on Elastic Beanstalk, the ideal strategy would be to use Rolling updates in Elastic Beanstalk so that the rolling updates feature would roll back to the last deployment if the deployment fails.

Option A is not the ideal strategy because it involves creating a Cloudformation template with the same resources as those in the Elastic Beanstalk environment. If the deployment fails, you deploy the Cloudformation template. This strategy may cause downtime as the creation and deployment of the CloudFormation template may take time.

Option C and D are also not the ideal strategy for minimizing downtime. Both options involve creating another parallel environment in Elastic Beanstalk. While creating a new parallel environment, the instances in the new environment need to be configured and tested before they can be used in production. This can take time and cause downtime. Additionally, creating a new Route53 Domain name for the new environment and releasing that URL to the users will require changes to the DNS settings, which may take time to propagate and may cause downtime.

Rolling updates in Elastic Beanstalk is the ideal strategy as it allows the new version of the application to be deployed to a subset of instances at a time. This means that the application remains available while the deployment is in progress. If the deployment fails, the rolling update feature automatically rolls back to the last deployment. This means that there is no downtime even if the deployment fails.

Overall, to minimize downtime while deploying updates to the critical application hosted on Elastic Beanstalk, it is recommended to use the Rolling updates feature in Elastic Beanstalk.