Deploying New Version of Stock Trading Application on AWS with Elastic Beanstalk

Deployment Policies for Seamless Application Update

Question

A leading Financial firm has deployed its stock trading application on Amazon EC2 instance in an Auto Scaling Group behind Application Load Balancer.

The software Team has developed a new version of this application & are seeking your support to deploy this new version to production.

The Operations head has instructed for a deployment using Elastic Beanstalk which should not have any service impact on the application & should be able to quickly rollback in case of failure during deployment.

Also post-deployment, initially only 10% of traffic should be diverted to the new version. Which of the deployment policies can be used to meet the requirement?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: A.

In the Traffic splitting deployment policy, AWS Elastic Beanstalk launches a full set of EC2 Instance in a new Auto Scaling group for the new version of the application.

Post deployment, a certain percentage of traffic can be diverted to a new setup.

This policy is easy for rollback.

As in case of any failure, traffic can be diverted to the old version which is not modified during deployment of the new version.

In the above case, the firm is looking for a new application version to be deployed without any service impact & with 10% traffic to the new version with quick rollback.

For this requirement, a traffic splitting deployment policy is best suited.

Option B is incorrect as although this deployment is suitable for deployment without any service impact to the existing application.

Still, it's not suitable for a quick rollback in case of deployment failure.

Option C is incorrect as with this deployment option, traffic splitting between old & new versions is not possible.

Option D is incorrect as this deployment option is not suitable for quick rollback.

For more information on deploying applications with deployment policies with AWS Elastic Beanstalk, refer to the following URLs,

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.rolling-version-deploy.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html

To meet the requirements of the Financial firm, the deployment policy should have zero service impact on the application and should be able to quickly rollback in case of failure during deployment. Additionally, only 10% of traffic should be diverted to the new version post-deployment. Let's go through the deployment policies provided and see which one suits the requirement.

A. Use Traffic splitting deployment policy: Traffic splitting deployment policy allows diverting a percentage of traffic to a new version of the application. However, it does not guarantee zero service impact on the application during deployment. Therefore, this policy may not be suitable for the requirement.

B. Use Rolling deployment policy: Rolling deployment policy deploys new instances gradually by replacing old ones in a rolling fashion. However, it may cause service impact during deployment as some of the instances may be unavailable for a short period. Therefore, this policy may not be suitable for the requirement.

C. Use Immutable deployment policy: Immutable deployment policy creates a new set of instances for the new version of the application and gradually diverts traffic to them. It ensures zero service impact during deployment as the new instances are created separately from the old ones. Additionally, it allows quickly rollback in case of failure during deployment by terminating the new instances. Therefore, this policy can be used to meet the requirement.

D. Use Rolling with an additional batch deployment policy: Rolling with an additional batch deployment policy deploys new instances in batches and gradually diverts traffic to them. It reduces service impact during deployment but still may cause some disruption. Additionally, it does not guarantee quick rollback in case of failure during deployment. Therefore, this policy may not be suitable for the requirement.

Based on the above analysis, we can conclude that the suitable deployment policy for the Financial firm's requirement is C. Use Immutable deployment policy.