What is a global load balancer (GSLB)?

NetworkingArchitecture

A global load balancer — also called GSLB, global server load balancing — sends each request to the nearest healthy region or data centre behind one hostname. A regional load balancer (nginx, HAProxy, an AWS ALB) picks a server inside one site; the global one works a level above and picks the site. It is built in one of two ways: DNS steering, where an authoritative DNS server answers each query with a different region’s IP, or anycast, where one IP is announced from many edge locations and a proxy at each edge forwards to a region.

It exists for two reasons:

Global vs regional load balancer

Global load balancerRegional load balancer
Choosesa region or data centrea server (VM, pod) inside one region
Built fromDNS answers, or an anycast IP with edge proxiesan L4/L7 proxy on a regional IP
Decides byregion health, client location, latency, weights, capacityround robin, least connections, hashing, per-server health
Failure it handlesa region or site going downa server or zone going down
ExamplesRoute 53, Global Accelerator, Traffic Manager, Cloudflare Load Balancingnginx, HAProxy, Envoy, AWS ALB / NLB

They stack. The global layer picks the region, then that region’s load balancer picks the server:

Global load balancer in three states: all regions healthy; ap-southeast down with two of three health probes failed and still receiving Asian users; ap-southeast drained after the third failed probe, Asian users sent to eu-west. Each region has its own regional load balancer and app servers. 1 · All regions healthy — every user is sent to the nearest region 2 · ap-southeast goes down — still in rotation until 3 probes fail 3 · ap-southeast drained — Asian users are sent to eu-west Users · Europe Warsaw · Paris · Madrid Users · Americas New York · Toronto Users · Asia Singapore · Tokyo Global load balancer a DNS answer per resolver, or one anycast IP at every edge health checks from many vantage points · policy: geo / latency / weight / priority still sent here Asia → eu-west probe probe probe probe ✕ eu-west regional LB (L4 / L7) app app app serving Europe serving Europe + Asia us-east regional LB (L4 / L7) app app app serving Americas ap-southeast ap-southeast regional LB (L4 / L7) app app app regional LB (L4 / L7) ✕ ✕ ✕ serving Asia 2 of 3 probes failed drained from answers
Two tiers: the global layer picks a region from health and proximity; each region's own load balancer picks a server. A region that fails its health probes is drained, and its users go to the next-nearest healthy region.
Global load balancer in three states: all regions healthy; ap-southeast down with two of three health probes failed and still receiving Asian users; ap-southeast drained after the third failed probe, Asian users sent to eu-west. Each region has its own regional load balancer and app servers. 1 · All healthy: nearest region 2 · ap-southeast down, not yet drained 3 · Drained: Asia goes to eu-west users in Europe users in Americas users in Asia Global load balancer a DNS answer per resolver, or one anycast IP at every edge health checks · geo / latency / weight Asia → eu-west probe probe probe probe ✕ eu-west regional LB app app app Europe Europe + Asia us-east regional LB app app app Americas ap-southeast ap-southeast regional LB app app app regional LB ✕ ✕ ✕ Asia 2 of 3 failed drained every region answers its health probes each user is sent to the nearest region ap-southeast is down; 2 of 3 probes have failed Asia is still sent there until the 3rd fails 3 probes failed → ap-southeast drained Asia → eu-west, the next-nearest healthy region
Two tiers: the global layer picks the region, each region's load balancer picks the server. A region that fails its probes is drained.

How DNS-based global load balancing works

The oldest and still most common GSLB is an authoritative DNS server that answers differently depending on who asks. api.example.com has no fixed A record; on each query the GSLB looks at the health of every region and at where the query came from, and returns the address of one region’s load balancer.

  1. The client asks its recursive resolver (the ISP’s, or 1.1.1.1, 8.8.8.8) for api.example.com — the same walk as in the recursive DNS resolution simulator.
  2. The resolver asks the GSLB, which is authoritative for that name.
  3. The GSLB sees the resolver’s IP — or, if the resolver sends it, the client’s subnet in the EDNS Client Subnet option (ECS, RFC 7871). It maps that to a location, drops unhealthy regions, applies the policy and answers with, say, 192.0.2.10 (eu-west) and a short TTL.
  4. The client connects straight to eu-west. The GSLB is not in the data path.

Strengths: it works for any protocol that resolves a name, it costs a DNS query rather than a proxied byte, and each region keeps its own IP addresses — so one GSLB can span several clouds and your own racks.

Weaknesses — all from caching, and from who the GSLB actually sees:

How anycast global load balancing works

Anycast announces the same IP prefix over BGP from many locations at once. Each router keeps its best path to that prefix, so a packet to the address arrives at whichever site is nearest in BGP terms. There is one IP for the whole world and no per-region answer to cache.

Anycast alone only gets packets to the nearest edge. A pure anycast service — the DNS root servers, 1.1.1.1 — answers from that edge directly; RFC 4786 (BCP 126) describes how to operate one. A global load balancer adds a proxy at each edge: it terminates TCP (and, for an L7 product, TLS or QUIC), then forwards over the provider’s private backbone to a backend region chosen by health, capacity and latency.

What that buys:

What it costs:

DNS-based vs anycast: the difference

DNS steering versus anycast when eu-west fails. DNS steering: the resolver asks the GSLB, which answers with a region IP (192.0.2.10, TTL 60 s) and the client connects directly; after the failure the cached answer keeps pointing at the dead region until the TTL ends, then the client re-resolves to us-east. Anycast: every client dials 203.0.113.1, BGP delivers it to the nearest edge (FRA, IAD, SIN), and the Frankfurt edge forwards to us-east as soon as eu-west is unhealthy. DNS steering — an IP per region client resolver GSLB DNS → query: api.example.com ← answer: 192.0.2.10 · TTL 60 s connects directly GSLB is not in the path until TTL ends: cached → eu-west ✕ then re-resolved → us-east eu-west 192.0.2.10 eu-west ✕ 192.0.2.10 us-east 198.51.100.10 ap-southeast 198.51.100.130 the GSLB only answers DNS — it never sees the traffic failover = detection + the TTL of every cached answer Anycast — one IP at every edge client EU client US client Asia 203.0.113.1 203.0.113.1 edge FRA 203.0.113.0/24 edge IAD 203.0.113.0/24 edge SIN 203.0.113.0/24 eu-west eu-west ✕ us-east ap-southeast BGP delivers each client to the nearest edge edge proxies to a healthy region · no cache to expire
Left: the GSLB answers DNS with a region's own IP and steps aside, so when a region dies clients hold the dead address until its TTL ends. Right: one anycast address reaches the nearest edge, which forwards to another region as soon as its backend is out — the edge itself stays up.
DNS steering versus anycast when eu-west fails. DNS steering: the resolver asks the GSLB, which answers with a region IP (192.0.2.10, TTL 60 s) and the client connects directly; after the failure the cached answer keeps pointing at the dead region until the TTL ends, then the client re-resolves to us-east. Anycast: every client dials 203.0.113.1, BGP delivers it to the nearest edge (FRA, IAD, SIN), and the Frankfurt edge forwards to us-east as soon as eu-west is unhealthy. DNS steering — an IP per region client resolver GSLB DNS → query: api.example.com ← answer: 192.0.2.10 · TTL 60 s connects directly GSLB is not in the path until TTL ends: cached → eu-west ✕ then re-resolved → us-east eu-west 192.0.2.10 eu-west ✕ 192.0.2.10 us-east 198.51.100.10 ap-southeast 198.51.100.130 the GSLB only answers DNS — it never sees the traffic failover = detection + the TTL of every cached answer Anycast — one IP at every edge client EU client US client Asia 203.0.113.1 203.0.113.1 edge FRA 203.0.113.0/24 edge IAD 203.0.113.0/24 edge SIN 203.0.113.0/24 eu-west eu-west ✕ us-east ap-southeast BGP delivers each client to the nearest edge edge proxies to a healthy region · no cache to expire
DNS clients hold a dead region's address until its TTL ends; an anycast edge forwards to another region at once.
DNS steeringAnycast + edge proxy
Addressesone per regionone for the world
In the data pathno — it only answers DNSyes — terminates the connection at the edge
Protocolsanything that resolves a namewhat the proxy speaks: TCP/UDP (L4) or HTTP(S) (L7)
Failover timedetection + TTL + client cachesdetection only
What it seesthe resolver’s IP, or an ECS prefixthe client’s real IP and every connection
Steering granularityper resolver, per TTLper connection or per request
Backendsany public IP: multi-cloud, on-premwhatever the provider’s edge can reach
You pay forDNS queries and health checkshours, plus every GB through the edge

Rule of thumb: put an anycast L7 proxy or CDN in front of HTTP, and use DNS steering for everything that is not HTTP — databases, MQTT, SMTP, game servers — and for anything that must span providers. The two also combine: a DNS-steered name can point at several anycast front ends.

Health checks and failover time

Both kinds depend on health checks, and the details decide how good the failover is:

SetupDetectionPropagationMost users moved after
DNS, 30 s interval × 3, TTL 60 s~90 sup to 60 s~2.5 min
DNS, 10 s interval × 3, TTL 60 s~30 sup to 60 s~1.5 min
Anycast edge, 10 s interval × 3~30 snone~30 s

Steering policies (routing policies)

Once the unhealthy targets are removed, a policy picks among the rest. The same six exist in every product under slightly different names:

Six steering policies as small diagrams. Failover: the primary is down, all traffic goes to the standby. Geolocation: EU users to eu-west, US users to us-east. Geoproximity: nearest region by distance, with a bias that moves the boundary. Latency-based: the region with 20 ms round trip wins over 100 ms. Weighted: 90 percent to stable, 10 percent to canary. Capacity or spillover: the nearest region is full, the rest overflows to the next. Failover / priority users 100% 1 · primary ✕ 2 · standby first healthy, in a fixed order Geolocation EU users US users eu-west us-east by the client's country Geoproximity bias A (bias +) B by distance, shifted by a bias Latency-based user 20 ms 100 ms eu-west us-east lowest measured round-trip time Weighted users 90% 10% stable canary a fixed ratio, e.g. 90 / 10 Capacity / spillover users overflow A · 100% full B · 35% nearest until full, then the next
The six steering policies. Accent arrows are the routes the policy chooses; amber is an unhealthy target.
Six steering policies as small diagrams. Failover: the primary is down, all traffic goes to the standby. Geolocation: EU users to eu-west, US users to us-east. Geoproximity: nearest region by distance, with a bias that moves the boundary. Latency-based: the region with 20 ms round trip wins over 100 ms. Weighted: 90 percent to stable, 10 percent to canary. Capacity or spillover: the nearest region is full, the rest overflows to the next. Failover / priority users 100% primary ✕ standby first healthy, fixed order Geolocation EU users US users eu-west us-east by the client's country Geoproximity bias A (bias+) B by distance + a bias Latency-based user 20 ms 100 ms eu-west us-east lowest measured RTT Weighted users 90% 10% stable canary fixed ratio, e.g. 90/10 Capacity / spillover users overflow A · full B · 35% nearest until it is full
The six steering policies. Accent arrows are the chosen routes; amber is an unhealthy target.
PolicyPicksTypical useCalled
Failover / prioritythe first healthy target in a fixed orderactive-passive DR: primary region, standby regionRoute 53 failover, Traffic Manager Priority, Cloudflare Off
Geolocationby the client’s country or continentdata residency (EU users stay in the EU), licensingRoute 53 geolocation, Traffic Manager Geographic, Cloudflare Geo
Geoproximityby distance, optionally biased per regionshift a share of load from a hot region to a neighbourRoute 53 geoproximity, Cloudflare Proximity
Latency-basedthe region with the lowest measured RTT from that networkactive-active with a global user baseRoute 53 latency, Traffic Manager Performance, Cloudflare Dynamic
Weightedby ratio, e.g. 90 / 10canary a new region, blue/green between stacksRoute 53 weighted, Traffic Manager Weighted, Cloudflare Random
Capacity / spilloverthe nearest region until it is full, then the nextabsorb a spike without overloading one siteGoogle Cloud WATERFALL_BY_REGION

Latency-based is not “geographically closest”: the provider keeps measurements of round-trip time between client networks and each region, taken over time, and sends a user where packets actually travel fastest.

Global load balancer products

ProductMechanismNotes
AWS Route 53DNSrouting policies: simple, failover, geolocation, geoproximity, latency, IP-based, multivalue answer, weighted; health checks attach per record
AWS Global Acceleratoranycast, L4 (TCP/UDP)two static anycast IPv4 addresses (four when dual-stack); client TCP terminates at the nearest AWS edge and rides the AWS backbone to endpoint groups, each with a 0–100% traffic dial
Google Cloud global external Application Load Balanceranycast, L7 proxyone anycast IP for all regions (Premium Tier); Google Front Ends terminate TLS at the edge and send each request to the closest region with capacity, overflowing to the next-closest
Azure Traffic ManagerDNSrouting methods: Priority, Weighted, Performance, Geographic, MultiValue, Subnet
Azure Front Dooredge L7 proxyTLS termination and split TCP at the edge. The classic tier is anycast; Standard / Premium pick the edge PoP during DNS resolution and reach it over a unicast IP — an edge proxy reached by DNS steering
Cloudflare Load BalancingDNS-only, or anycast L7 proxythe same pools and monitors either as DNS answers or proxied through Cloudflare’s anycast network
F5 BIG-IP DNS (GTM before v12), IBM NS1 Connect, Akamai GTMDNSthe classic GSLB appliance and the managed multi-cloud DNS services

What a global load balancer does not solve

Moving traffic between regions is the easy half. The hard half is everything with state:

FAQ

Is a global load balancer the same as a CDN? No. A CDN caches content at the edge; a global load balancer routes requests to the region that will serve them. They are often the same anycast network sold as two features (Cloudflare, Google Cloud, Azure Front Door), and a CDN in front does not remove the need to pick an origin region.

Do I still need a regional load balancer? Yes. The global layer picks a region and stops there; spreading requests over servers, zone failover and connection draining inside the region are the regional load balancer’s job.

What TTL should a GSLB record have? 30–60 s. Route 53 recommends 60 s or less for records tied to a health check. Going lower mostly raises query volume: resolvers and clients that ignore the TTL still set the tail.

How fast is global failover? Detection (interval × threshold, typically 30–90 s) plus, for DNS steering, the TTL and client caches — about 1.5–2.5 minutes for most users with a 60 s TTL. With an anycast edge proxy it is the detection time alone.

TL;DR: A global load balancer chooses the region; a regional load balancer chooses the server. It is built either from DNS (answer each resolver with a different region’s IP — cheap, protocol-agnostic, but failover waits on cached TTLs and it sees the resolver, not the user) or from anycast (one IP announced by BGP from every edge, a proxy there forwards to a healthy region — no cache to wait for and short handshakes, but you need a provider’s network). Both depend on multi-vantage health checks and a policy: failover, geo, latency, weighted, spillover. It moves traffic, not data: replication, sessions and spare capacity decide whether a regional failover actually works.

Questions? Let's Chat :)

fundamentals