← Lessons

quiz vs the machine

Platinum1820

Networking

Global Server Load Balancing

How traffic is steered across regions before it reaches any single data center.

5 min read · advanced · beat Platinum to climb

Balancing across the planet

A local load balancer spreads traffic inside one data center. Global server load balancing, often called GSLB, decides which data center or region a user reaches in the first place.

How users get steered

GSLB usually works at the DNS layer or with anycast routing:

  • DNS based GSLB returns different addresses depending on the client location, latency, or region health, sending users toward a nearby healthy site.
  • Anycast advertises the same address from many locations, and the network routes each user to the topologically nearest one.

It folds in health and geography: an unhealthy region is pulled from rotation, and users are biased toward low latency sites.

The hard parts

DNS based steering is limited by caching and time to live: resolvers may hold a stale answer past a region failure, so failover is not instant. Anycast reacts faster but gives less control over exact routing. GSLB also needs accurate health signals from each region, since steering users to a dead site is worse than a slightly longer path. These constraints make global steering a balance of speed, control, and freshness.

Key idea

Global server load balancing steers users to the nearest healthy region using DNS or anycast, bounded by caching and the freshness of health signals.

Check yourself

Answer to earn rating on the learn ladder.

1. What does global server load balancing decide?

2. Why is DNS based failover not instant?