Global server load balancing, or GSLB, is the practice of distributing client traffic across servers or data centers in different geographic locations, so that each user reaches a healthy site that is close, responsive and not overloaded. In load balancing, it is the layer above local load balancers: while a local load balancer spreads requests among servers inside one site, GSLB decides which site a client should use in the first place.
GSLB serves two main purposes. It improves performance by sending users to nearby or less busy locations, and it provides disaster recovery by steering traffic away from a site that has failed or is under maintenance, often within seconds to minutes.
How global server load balancing directs clients
Most GSLB systems work through DNS. When a client resolves a service name, the GSLB system acts as the authoritative name server for that name and returns the address of the best site for that particular request, based on health checks and the configured policy.
- The client asks its resolver for the address of the service name.
- The resolver queries the GSLB name server, which is authoritative for that name.
- The GSLB system evaluates site health, load, location and policy.
- It returns the address of the chosen site, usually the virtual address of a local load balancer.
- The client connects to that site, where local load balancing selects a specific server.
Other designs route traffic with anycast, in which several sites announce the same IP address and internet routing delivers each packet to the nearest one. Anycast reacts at the network layer and avoids DNS caching delays, but it offers less fine-grained control than DNS-based policies.
Some providers combine both methods, using anycast for their own name servers and DNS answers for the application itself. A further variant uses HTTP redirection, in which a central entry point answers the first request with a redirect to a regional address. It is precise, because the decision is made per user, but it adds a round trip and works only for web traffic.
Site selection methods
GSLB chooses a site using one or more selection methods, usually applied in order with fallbacks. Health status always comes first: an unhealthy site is removed from consideration regardless of any other criterion.
| Method | How it chooses a site | Typical use |
|---|---|---|
| Geographic proximity | Maps the resolver location to the nearest site | Lower latency for global users |
| Measured latency | Uses round-trip times from probes or clients | Performance-sensitive services |
| Weighted distribution | Splits traffic by configured percentages | Gradual migrations and canary sites |
| Active-standby failover | Uses a backup site only when the primary fails | Disaster recovery |
| Load or capacity | Prefers sites with spare capacity | Uneven traffic or site sizes |
| Round robin | Rotates through healthy sites | Simple equal sharing |
Geographic decisions often rely on the location of the recursive resolver, not the user. A user who relies on a distant public resolver may be sent to the wrong region unless the resolver forwards a client subnet hint, which many resolvers support.
Key parameters that control behavior
The speed and accuracy of GSLB depend on a few parameters that interact with each other. The most important trade-off is between fast failover and the extra load created by short caching times.
| Parameter | Typical range | Effect |
|---|---|---|
| DNS record TTL | About 30 to 300 seconds | Shorter values speed failover but increase queries |
| Health check interval | About 5 to 30 seconds | Shorter values detect failures sooner |
| Failure threshold | About 2 to 5 failed checks | Prevents flapping on single errors |
| Site weights | Percentages or ratios | Controls the share of traffic per site |
Health checks should test the real service, not just reachability. A site whose web servers answer pings but whose database is unavailable must be marked as down, which is why application-level checks against a dedicated status endpoint are preferred.
Health checks should also run from several vantage points. A single probe location may lose connectivity to a site that is perfectly reachable for users, and acting on such a false alarm can shift traffic unnecessarily. Requiring agreement between probes in different networks makes failover decisions considerably more reliable.
GSLB compared with related approaches
GSLB is often confused with plain DNS load balancing and with content delivery networks, but the three solve different problems. The comparison below clarifies where each one fits.
| Technique | Decision basis | Main limitation |
|---|---|---|
| GSLB | Health, location and policy per query | Depends on DNS caching or anycast routing |
| DNS load balancing | Static rotation of several records | No awareness of site health |
| Local load balancer | Server state within one site | Cannot survive the loss of the site |
| Content delivery network | Edge caches close to users | Focuses on cacheable content |
In practice these layers are combined: GSLB selects the region, a local load balancer performs TLS termination and spreads requests across servers, and a content delivery network caches static assets at the edge.
Pitfalls in real deployments
GSLB fails most often because of assumptions about caching and state. Clients and resolvers do not always behave as the configuration expects, and multi-site applications have data consistency requirements that traffic steering alone cannot solve.
- Resolvers may ignore short TTLs, so some clients keep using a failed site for minutes.
- Sessions do not move automatically: users switched to another site may lose their session unless state is shared.
- Data replication must keep up, or users see outdated data after failover.
- The GSLB service itself must be redundant, with name servers in several locations.
- Untested failover is unreliable: regular drills reveal missing capacity and hidden dependencies.
The simple explanation
Global server load balancing is a traffic director for websites that run in several places at once. When you open such a service, the system checks which of its locations is working, close to you and not too busy, and sends you there.
If one location fails, visitors are sent elsewhere. Much like a navigation app steering drivers around a closed road, it keeps the service reachable even when a whole data center goes offline.
How it is used in practice
An online booking service runs identical application stacks in two data centers, one in Western Europe and one on the East Coast of North America, with databases replicated between them. A GSLB system answers DNS queries for the service name with a TTL of 60 seconds and runs application health checks every 10 seconds.
European users are normally sent to the European site and American users to the American one, which keeps response times low. During a power incident, the European site fails its health checks three times in a row, and the GSLB system starts returning the American address. Within a few minutes, most European users are booking through the other site while engineers restore power.