Interview Prep/Networking/Load Balancers, Proxies & CDNs

How would you implement a canary or weighted rollout using load balancers?

AdvancedConceptLoad Balancers, Proxies & CDNs
Answer

With an ALB, create two target groups and a forward action with weights (for example 95/5), watch error rate and latency per target group, then shift gradually. Route 53 weighted records can do it across load balancers but are subject to DNS caching.

aws elbv2 modify-listener --listener-arn $L --default-actions \
 'Type=forward,ForwardConfig={TargetGroups=[{TargetGroupArn=blue,Weight=95},{TargetGroupArn=green,Weight=5}]}'

Automate rollback on SLO breach with CodeDeploy, Argo Rollouts or Flagger.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs