Global server load balancing and traffic management: DNS-based GSLB, anycast and failover between sites
In short: Global server load balancing directs users to the best site for an application, usually by answering DNS queries with the address of the nearest healthy data centre or region. Health checks remove failed sites, and policies can balance load or keep one site as standby. Anycast and cloud global load balancers achieve similar results at the IP level, often with faster failover.
Beyond one data centre
A local load balancer spreads traffic across servers in one site. When an application runs in two or more data centres or cloud regions, something must decide which site each user goes to, and move users if a site fails. This is global server load balancing (GSLB) or global traffic management.
DNS-based GSLB
The GSLB system is authoritative for the application's name. When a resolver asks for app.example.com, it chooses which site's address to return based on:
- Health: regular checks of each site's service; failed sites are removed.
- Location: the resolver's (or with EDNS Client Subnet, the user's) approximate location, to pick the nearest site.
- Load or weighting: spreading users by capacity, or sending a small share to a new site.
- Policy: active/standby, where a second site is only used when the first fails.
Products include F5 BIG-IP DNS, Citrix ADC, and cloud services such as AWS Route 53 routing policies, Azure Traffic Manager and Cloudflare Load Balancing.
The TTL trade-off
DNS answers are cached for their TTL. A short TTL (30 to 60 seconds) lets users move quickly after a failure, but increases DNS queries. Some resolvers and applications ignore TTLs and keep old answers longer, so DNS failover is never instant. Applications should also retry and reconnect gracefully.
Anycast and global load balancers
- Anycast: the same IP address is announced with BGP from every site. Routing sends each user to the nearest one, and if a site stops announcing, traffic moves within seconds without any DNS caching issue. Common for DNS services, CDNs and DDoS protection.
- Cloud global load balancers (Google Cloud global load balancing, Azure Front Door, AWS Global Accelerator) give users one anycast address at the provider's edge and route requests to the best healthy region over the provider's network.
Active/active or active/standby?
- Active/active: both sites serve users. Better use of capacity and you know both work, but data must be kept in sync between sites, which is the hard part.
- Active/standby: the second site takes over only on failure. Simpler for data, but the standby must be tested regularly.
Session persistence
Users partway through a session (a shopping basket, a login) may lose their state if moved to another site. Applications should store session state in a shared database or cache, or use tokens, so any site can serve any user.
Real-world example: the region outage
An online booking company ran in two cloud regions with DNS-based GSLB and 60-second TTLs. When one region had a major outage, health checks failed within 30 seconds and the GSLB stopped returning that region. Most users were on the other region within two minutes. Because sessions were stored in a replicated database, they continued their bookings after a page refresh.
Practice
How does DNS-based GSLB send users to a healthy site?
Why is DNS-based failover never instant?
How does anycast achieve site failover?
Key takeaways
- GSLB chooses the site; local load balancers choose the server.
- DNS-based GSLB uses health, location, load and policy; TTL limits failover speed.
- Anycast and cloud global load balancers fail over at the IP level.
- Store session state centrally so any site can serve any user.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.