Back to results for “Monitoring”
AWS › Elastic Load Balancing (ALB, NLB & CLB)

How do you design a load balancer architecture that supports zero downtime blue green or canary deployments for a production application?

Advanced

Answer

A zero downtime deployment architecture typically uses weighted target groups behind an Application Load Balancer listener rule, letting you gradually shift a defined percentage of traffic from an old target group running the current version to a new target group running the updated version, closely monitoring error rates and performance metrics during the shift, and instantly reverting the weight back to the original target group if any problem is detected, without ever needing to take the application offline during the transition.
aws elbv2 modify-rule --rule-arn arn:aws:elasticloadbalancing:... --actions Type=forward,ForwardConfig='{"TargetGroups":[{"TargetGroupArn":"arn:old","Weight":90},{"TargetGroupArn":"arn:new","Weight":10}]}'
Real-world example A company deploying a major update to its checkout service configures weighted target groups on their Application Load Balancer, gradually shifting traffic from ten percent to one hundred percent onto the new version over the course of an hour while closely monitoring for any increase in error rates.

Common follow-ups: How quickly can traffic weighting be adjusted or reverted during a canary deployment?;What monitoring should be in place to automatically detect problems during a weighted traffic shift?