Skip to content
[menu]

FOUNDRYNETNo. 001SEPTEMBER 2026LOAD BALANCING

Original page: foundrynet.com/solutions/appNotes/GSLB.html (ServerIron GSLB application note, around 2002)

Global Server Load Balancing (GSLB): DNS-Based Site Selection

GSLB steers each client to the best data centre by answering DNS queries with the address of a site that is healthy, close and not overloaded.

On this pageHow DNS-based GSLB worksThe authoritative DNS proxy modelSite selection metricsTTL trade-offs and DNS cachingAnycast versus GSLBActive/active versus active/DR sitesHow GSLB and local SLB fit togetherQuestions

01 /How DNS-based GSLB works

Every connection begins with a name lookup. If the authoritative answer for www.example.com can vary per query, it can point each client at the data centre best placed to serve it. A GSLB device is an authoritative DNS server, or a proxy in front of one, that orders the A and AAAA records it returns based on live measurements of each site.

GSLB resolution pathGSLB RESOLUTION PATH01Client asksresolver02Resolverqueries GSLB03GSLB scoressites04Best VIPreturned05Clientconnects tosite
The decision happens at resolution time; once the client holds an address, GSLB has no further influence.

Each site runs its own local server load balancer with a VIP. GSLB decides which VIP to advertise; local SLB decides which real server behind it takes the connection. The ServerIron generation could do both on one box.

02 /The authoritative DNS proxy model

There are two ways into the resolution path. The first makes the GSLB device the authoritative server for the zone. The second, which the original Foundry GSLB application note described for the ServerIron, is the proxy model: the existing authoritative servers stay in place, the GSLB device fronts them on a VIP and inspects each response on the way out. When a response contains addresses of sites it monitors, it reorders them so the preferred site comes first.

03 /Site selection metrics

The device evaluates a chain of metrics per query and stops at the first that yields a single winner. The order is configurable; a typical chain runs health, then proximity or RTT, then load, then a tie-breaker.

Typical GSLB metric chain. Health is always first; the rest is policy.
MetricWhat it measuresWeakness
Site healthWhether the site VIP answers checksBinary; says nothing about quality
Geographic proximityRegion of the querying resolver from an IP databaseResolver location is not client location
Round-trip timeLatency between each site and the querying resolverNeeds a prior sample
Site loadConnections or headroom at each siteLags by the reporting interval
Least responseWhich site answered its health check fastestRewards idle sites, can oscillate
NOTE

Proximity and RTT metrics measure the recursive resolver, not the end user. Users of a large public resolver are scored as sitting wherever that resolver node lives. The client subnet extension (RFC 7871) reduces the error when both sides support it.

04 /TTL trade-offs and DNS caching

GSLB only works if resolvers come back and ask again; the TTL on the returned record controls that. A short TTL (30 to 60 seconds) drains a failed site within a minute, at the price of many more queries and slightly higher latency on first connections. A long TTL is cheap but pins clients to a dead site until it expires.

Real caching is worse than the TTL implies. Some resolvers clamp low TTLs to a floor. Browsers and operating systems keep their own caches. Some runtimes resolve a name once at start-up and never again. Plan for a tail of clients arriving at the old site long after expiry, and keep the old VIP answering or redirecting for them.

05 /Anycast versus GSLB

IP anycast announces the same prefix from several sites and lets BGP route each client to the topologically nearest one. It needs no DNS tricks and reacts to site failure at routing-convergence speed. It suits stateless, short-transaction services such as DNS itself, and long-lived TCP sessions poorly, because a mid-session route change lands the client on a site with no record of the connection. GSLB reacts more slowly but keeps each session on one site and can weigh load and health, not just topology. Many deployments run anycast for DNS and GSLB for the application; see core routing.

06 /Active/active versus active/DR sites

In an active/active design every site serves traffic and GSLB spreads clients by proximity or load. It uses all the hardware and proves every site daily, but the application must tolerate users split across sites, which usually means replicated state. In an active/DR design GSLB returns only the primary site while healthy and switches every answer to the standby when checks fail. It is simpler and the standby can be smaller, but the failover path runs only during incidents, so test it on a schedule.

07 /How GSLB and local SLB fit together

GSLB health checks target the site VIP; when the local balancer marks every real server down, the VIP fails and GSLB stops advertising the site. Local SLB handles persistence, Layer 7 switching and server-level failover inside the site. Keep the GSLB check interval longer than the local one so a single server restart does not flap the site out. The load balancing hub follows this two-tier model.

08 /Questions

Is GSLB the same as round-robin DNS?

No. Round-robin DNS returns addresses in rotation with no knowledge of site health or load, so it keeps sending clients to a dead site until someone edits the zone. GSLB measures each site continuously and changes answers automatically.

What TTL should a GSLB record use?

Between 30 and 300 seconds is typical. Shorter values drain a failed site faster but multiply query load and depend on resolvers honouring the value. Choose the longest TTL whose failover delay the business can tolerate.

Can GSLB move a user who is already connected?

No. GSLB acts only at name resolution. An open TCP session stays with the site it reached until it closes or the client resolves again. Mid-session failover needs replicated state and client-side reconnection logic.

Why does geographic GSLB sometimes send users to the wrong region?

The GSLB device sees the address of the recursive resolver, not the user, so users of centralised public resolvers are located wherever that resolver node sits. Client subnet extensions in DNS queries reduce this error when supported on both sides.

Does GSLB replace local server load balancing?

No. GSLB selects a site; local SLB selects a server within it and handles persistence, per-server health checks and Layer 7 features. They run in series: a site VIP failing its local checks tells GSLB to stop advertising it.

Sources

  • IETF RFC 1034 and RFC 1035, Domain Names, 1987
  • IETF RFC 4786, Operation of Anycast Services, 2006
  • IETF RFC 7871, Client Subnet in DNS Queries, 2016
  • Foundry Networks, Global Server Load Balancing application note (original Foundry documentation, historical, around 2002)