Soru

Zorluk: OrtaDeployment Strategy Design

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 10%10\% 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.)

  1. Define two App Mesh virtual nodes representing the stable version and the canary version, and configure a virtual route with weighted targets of 90%90\% and 10%10\% respectively.Cevap
  2. 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 100%100\% for the stable virtual node if the alarms are triggered.Cevap
  3. C
    Configure an AWS CodeDeploy deployment group with the ECSLinear10PercentEvery10Minutes configuration and associate it with the App Mesh virtual router.
  4. D
    Configure the Amazon ECS service to use rolling updates, set the minimum healthy percent to 90%90\%, and use Route 53 weighted routing to split traffic between the ECS tasks.
  5. E
    Create separate Application Load Balancers (ALBs) for the stable and canary versions, and configure Route 53 weighted routing with a 9:19:1 ratio to split traffic between them.

Cevap

Configure two AWS App Mesh virtual nodes representing the stable and canary versions with a virtual route weight split of 90%90\% and 10%10\% respectively, and use Amazon CloudWatch alarms monitoring the canary node to trigger an AWS Lambda function to revert route weights to 100%100\% 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 90%90\% and 10%10\%, 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 100%100\% for the stable node ensures automated, low-latency rollback without client-side DNS caching delays or the overhead of multiple load balancers.

Adım Adım Çözüm

1
Define separate virtual nodes in App Mesh for the stable and canary versions of the microservice, referencing their respective ECS task group endpoints.
This isolates traffic destinations within the mesh so that they can be controlled independently.
Before routing traffic, App Mesh needs to know the specific destinations for each version.
2
Update the App Mesh virtual route under the virtual router to route 90%90\% of requests to the stable virtual node and 10%10\% of requests to the canary virtual node.
The service mesh splits incoming traffic dynamically at the client-side proxy level, ensuring a precise 90/1090/10 traffic distribution.
This establishes the canary testing phase as requested.
3
Create CloudWatch alarms based on the Envoy proxy metrics of the canary virtual node to monitor 5xx errors and latency.
The deployment environment can now detect when the new version fails to meet operational standards.
Automated rollback requires continuous monitoring of target metrics on the canary version.
4
Configure an AWS Lambda function triggered by the CloudWatch alarms to execute an App Mesh API call that resets the virtual route weight of the stable node to 100%100\%.
If the canary version exhibits errors, traffic is immediately redirected back to the stable version, achieving a zero-downtime rollback.
This automates the rollback step and minimizes management overhead.

Anahtar Kavram

Canary deployment and traffic shifting using AWS App Mesh virtual routing and CloudWatch-driven rollback automation.
Tahmini Süre:2m 0s
Bu soruyu puanla