← Lessons

quiz vs the machine

Platinum1820

System Design

DNS Based Global Load Balancing

Steering users to the right region by controlling DNS answers.

6 min read · advanced · beat Platinum to climb

Balancing at the Name Layer

Before a user connects, they resolve your domain. DNS based global load balancing answers that lookup with the address of the best site for that user, steering traffic across regions without touching the request path.

How It Decides

  • Health so unhealthy sites are removed from answers
  • Proximity so users reach a nearby region
  • Capacity so a saturated site sheds load to another
  • Weights so operators can shift traffic gradually

The resolver returns one of several candidate addresses, and the user connects there.

The TTL Catch

DNS answers are cached by resolvers for their TTL. A long TTL reduces lookups but slows failover, since clients keep using a stale address. A short TTL speeds failover but raises DNS query volume. This makes DNS load balancing coarse grained and a little slow to react.

Why It Still Wins

It works for any protocol, needs no inline proxy, and scales globally, which is why CDNs lean on it heavily.

Key idea

DNS based global load balancing steers users by returning the best site address at resolution time using health, proximity, and capacity, but TTL caching makes it coarse grained and slow to fail over.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is DNS based load balancing considered slow to fail over?

2. What does a global DNS load balancer use to pick an address?

3. What is a benefit of steering at the DNS layer?