A developer has a production API hosted on Amazon API Gateway and wants to introduce a new API version. To minimize risk, the developer needs to route of the API traffic to the new version using the same endpoint, while the remaining continues to go to the current version. The developer wants to monitor the performance of the new version and must be able to immediately roll back all traffic to the current version if any anomalies are detected. Which deployment approach should the developer use to meet these requirements?
- ADeploy the new API version to a new stage, configure a Route 53 weighted routing policy with a weight pointing to the new stage's endpoint, and decrease the TTL to zero for immediate rollback.
- BDeploy the new API version to a new stage, configure an Application Load Balancer with weighted target groups routing of traffic to the new stage, and modify the target group weights to to roll back.
- Enable canary settings on the existing API Gateway stage, set the canary traffic percentage to , and delete the canary deployment if any anomalies are detected.Cevap
- DCreate a Route 53 failover routing policy that designates the current stage as primary and the new stage as secondary, and configure a CloudWatch alarm to trigger the failover.
Cevap
Enable canary settings on the existing API Gateway stage, set the canary traffic percentage to , and delete the canary deployment if any anomalies are detected.
Enabling canary settings on an existing API Gateway stage allows a developer to route a small percentage of traffic (such as ) to a new deployment using the same endpoint. If anomalies occur, deleting the canary deployment immediately routes all traffic back to the stable production version, satisfying the rollback requirement.
Adım Adım Çözüm
Anahtar Kavram
API Gateway Canary Deployments
Tahmini Süre:1m 15s