How do you perform a blue/green deployment at the load balancer level?
IntermediateProductionLoad Balancing, Proxies & nginx in Production
Answer
Two target groups (blue and green) behind one ALB listener. Deploy and validate green with a test listener or header-based rule, then switch the listener's default action to green (or shift weights). Keep blue running until you are sure, then roll back instantly by switching again.
Remember connection draining on blue and database compatibility between versions.
More on Load Balancing, Proxies & nginx in Production
How do you choose between ALB, NLB and an nginx or Envoy fleet?IntermediateHow do you tune ALB idle timeout and backend keep-alive to avoid 502s?IntermediateWhich nginx directives matter most for a production reverse proxy?IntermediateHow do you do rate limiting and abuse protection in nginx?IntermediateHow do you achieve zero-downtime configuration reloads in nginx and HAProxy?IntermediateHow would you design a highly available load-balancing tier on-prem or in a colo?Advanced