A company is designing a deployment pipeline for an internal microservices-based application running on Amazon ECS with AWS App Mesh. The development team wants to implement a canary deployment strategy for a critical microservice. The strategy must initially route of traffic to the new version and automatically roll back to the stable version if the HTTP 5xx error rate or latency exceeds predefined thresholds on the new version. The solutions architect must design a solution that minimizes management overhead and ensures immediate rollback. Which two actions should the solutions architect recommend to implement this deployment strategy? (Select two.)
- Define two App Mesh virtual nodes representing the stable version and the canary version, and configure a virtual route with weighted targets of and respectively.Answer
- Configure Amazon CloudWatch alarms to monitor the HTTP 5xx error rate and latency of the canary virtual node, and configure an AWS Lambda function to revert the virtual route weights to for the stable virtual node if the alarms are triggered.Answer
- CConfigure an AWS CodeDeploy deployment group with the ECSLinear10PercentEvery10Minutes configuration and associate it with the App Mesh virtual router.
- DConfigure the Amazon ECS service to use rolling updates, set the minimum healthy percent to , and use Route 53 weighted routing to split traffic between the ECS tasks.
- ECreate separate Application Load Balancers (ALBs) for the stable and canary versions, and configure Route 53 weighted routing with a ratio to split traffic between them.
Answer
Configure two AWS App Mesh virtual nodes representing the stable and canary versions with a virtual route weight split of and respectively, and use Amazon CloudWatch alarms monitoring the canary node to trigger an AWS Lambda function to revert route weights to for the stable node upon failure.
The correct strategy uses AWS App Mesh's native routing controls. By defining two virtual nodes (one for the stable version and one for the canary version) and adjusting the virtual route weights under the virtual router to and , traffic is precisely shifted at the application level. Monitoring the canary virtual node with CloudWatch alarms and using a Lambda function to update the virtual route weights back to for the stable node ensures automated, low-latency rollback without client-side DNS caching delays or the overhead of multiple load balancers.
Step-by-Step Solution
Key Concept
Canary deployment and traffic shifting using AWS App Mesh virtual routing and CloudWatch-driven rollback automation.
Estimated Time:2m 0s