Global Traffic Steering
Load Balancing spreads requests across a pool of servers in one place; CDNs & Caching moves content close to users. This page is about the layer above both: when you run entire data centers in multiple regions, something has to decide which region a given user's traffic reaches in the first place, and what happens when one of those regions goes dark.
Anycast: many sites, one IP
Ordinarily, one IP address means one machine (or one load balancer) somewhere. Anycast breaks that assumption: the same IP address is announced from many physical sites at once, and the network's own routing decides which site a given user actually reaches.
This works because BGP, the protocol that builds the internet's routing
tables, picks the "closest" path to a destination in terms of network
topology (fewest hops / shortest AS path), not physical geography. Announce
203.0.113.1 from data centers in Frankfurt, Singapore, and Virginia, and a
user in Berlin's traffic naturally routes to Frankfurt, a user in Tokyo's to
Singapore - each reaches the nearest site simply because that is the path BGP
already prefers, with no DNS lookup involved in the decision at all.
Anycast steering happens at the routing layer, before a single packet of
application traffic is sent. It's also how large DNS resolver services (like
public 1.1.1.1 / 8.8.8.8) and DDoS-scrubbing networks answer the same
address from hundreds of sites worldwide.
If a site announcing an anycast address goes down, it simply stops advertising the route, and BGP reconverges onto the next-nearest site within the normal routing-update timescale - failover is a routing property, not something the application has to detect and react to.
GSLB and DNS-based steering
The other common approach works at the DNS layer instead of the routing layer. A Global Server Load Balancer (GSLB) is authoritative DNS for a name, but instead of always returning the same IP, it decides which region's IP to hand back per query, based on:
- Latency - measured or estimated round-trip time from the resolver's location to each candidate region, returning whichever is fastest.
- Health - regions currently failing health checks are simply left out of the answer, the same principle as pulling an unhealthy backend from a pool in Load Balancing, just applied across whole regions instead of individual servers.
CDNs & Caching already covers this exact mechanism for routing users to the nearest edge PoP - a GSLB in front of full application regions is the same idea, one level up: DNS resolution as the traffic-steering point, applied to entire data centers instead of cache nodes.
| Anycast | GSLB / DNS steering | |
|---|---|---|
| Decides at | Routing layer (BGP) | DNS resolution |
| Granularity | Per packet/connection, via network path | Per DNS query, cached for the record's TTL |
| Failover speed | BGP reconvergence - seconds | Bounded by DNS TTL - can lag behind a real failure |
| Health awareness | None built in - purely topological | Can factor in live health checks |
Active-active versus active-passive
Once traffic can be steered to multiple regions, there's a choice about how those regions are actually used day to day.
- Active-active - every region serves live traffic all the time. GSLB or anycast simply splits load across all of them by latency or a fixed weight. If one region fails, the others absorb its share - no failover event needed, because there was never a single region "in charge." The cost is running (and keeping data consistent across) multiple full regions continuously.
- Active-passive - one region serves all traffic; one or more standby regions sit idle (or serve only a trickle) until the primary fails a health check, at which point steering redirects traffic to the standby. Simpler to reason about - one source of truth at a time - but failover is an event: it takes time to detect the failure and redirect, and the standby needs to actually be ready to take full load the moment it's promoted.
A rarely-used passive standby is a liability if it's untested. Configuration drift, expired certificates, or a database replica that silently fell behind all hide quietly until the one moment you need the standby to work - failing over into a region that turns out to be broken doubles the outage.
Recap
- Anycast announces one IP from many sites; BGP routes each user to the topologically nearest one, with failover as a routing property.
- GSLB steers at the DNS layer, choosing which region's IP to return per query based on latency or health - the same DNS-steering mechanism CDNs use for edge PoPs, applied to whole regions.
- Active-active runs all regions live and splits load continuously; active-passive keeps one region live and fails over to a standby on detected failure.
- An untested passive standby can fail silently until the moment it's needed, turning a failover into a second outage.