How do you do blue/green with weighted target groups on an ALB?
IntermediateScenarioLoad Balancing, Proxies & CDN
Answer
Situation read → Weighted forwarding lets you shift traffic gradually without DNS changes.
What I'd do →
- Create two target groups, blue and green
- Set a listener rule action forwarding with weights
blue=100 green=0 - Deploy green, test it through a header-based rule
- Shift 10, 50, 100 percent while watching 5xx and latency
- Roll back by setting the weights back, which is instant
Why → Weights are enforced per request, so shifts take effect immediately, unlike DNS.
Interview tip → Mention CodeDeploy or Argo Rollouts can automate these steps.
More on Load Balancing, Proxies & CDN
What is the difference between a Layer 4 and a Layer 7 load balancer?BeginnerWhen do you choose an ALB and when an NLB in AWS?BeginnerForward proxy versus reverse proxy: what is the difference?BeginnerHow do health checks work on a load balancer and what makes a good one?BeginnerWhat are sticky sessions and why would you avoid them?BeginnerWhat does a CDN do and when does it help?Beginner