You must migrate from one load balancer to another with zero downtime. How?
AdvancedScenarioLoad Balancing, Proxies & CDN
Answer
Situation read → Run both in parallel and move traffic with DNS weights.
What I'd do →
- Build the new LB with identical rules and targets and test with
curl --resolve - Lower the DNS TTL in advance
- Use weighted records to shift 1, 10, 50, 100 percent while watching 5xx and latency
- Keep the old LB for a full TTL after 100 percent
- Update allow lists that contain LB IPs or hostnames
Why → Parallel run with weighted DNS makes rollback instant at any step.
Interview tip → Mention that clients with stale DNS keep hitting the old one for TTL, so don't decommission early.
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