Course map

Topic 196 / Advanced

Multi-region traffic and failover

Chapter 12.2 · Disaster Recovery

What and why

GeoDNS and Anycast (→ 94) route each request to the nearest healthy region in steady state; this topic is what happens when a whole region stops being healthy — detecting it, draining traffic out of it, and shifting the rest of the world's traffic onto the regions still standing. Boundary: where data lives and stays consistent during this shift is → 142; this topic is the failover orchestration itself, on top of → 94's routing mechanics. Builds on: → 94 (global traffic routing: GeoDNS and Anycast).

Diagram

Multi-region traffic and failover Continuous health checks run on each region. When a region fails health checks, it is marked unhealthy. That triggers a drain: new traffic stops going to the failing region. GeoDNS answers and Anycast announcements update to shift weight away from it. The surviving region or regions absorb the shifted load, and headroom is verified. Continuous health checks on each region Region fails health checks Mark region unhealthy Drain: stop sending NEW traffic to the failing region Shift weight: GeoDNS answers / Anycast announcements updated Surviving region(s) absorb the shifted load Verify headroom (→ 102)
Health checks run from outside the region, so a region that can't even answer is still correctly caught. Reaction speed depends on the mechanism: GeoDNS is bound by the record's TTL, while Anycast reacts as fast as BGP converges — usually faster. The shift in the last step only works if the surviving region was already provisioned with the headroom to absorb it; otherwise the failover just relocates the outage.
Text version of this diagram
continuous health checks on each region
        │
        ▼
region fails health checks ──► mark region unhealthy
        │
        ▼
drain: stop sending NEW traffic to the failing region
        │
        ▼
shift weight: GeoDNS answers / Anycast announcements updated
        │
        ▼
surviving region(s) absorb the shifted load ──► verify headroom (→ 102)

How it works

  1. Health-check each region from outside itself (an external prober, not a self-report) so a region that can't even answer health checks is still correctly detected as unhealthy.
  2. On a confirmed failure, stop routing new requests to the failing region — GeoDNS stops answering with its IP, or the region withdraws its Anycast announcement.
  3. In-flight requests in the failing region drain or are abandoned, depending on how far the failure has progressed — this is the same drain-then-exit idea as → 98, now applied at regional scale.
  4. Traffic that would have gone to the failed region is absorbed by the remaining region(s); this only works if those regions were already provisioned with the headroom to take it (→ 102) — failover that overloads the survivor just relocates the outage.
  5. Reaction speed depends on the mechanism: GeoDNS is bound by the record's TTL (cached answers keep pointing at the dead region until they expire); Anycast reacts as fast as BGP converges, usually faster — the same trade-off named at → 94, now the thing that determines how long this failover actually takes.

Practical example

(illustrative). Two regions, EU and US, each normally serving half of global traffic with 2× headroom provisioned. The EU region fails. Detection (external health checks, 3 failed probes at 10 s apart) takes ≈ 30 s; GeoDNS TTL is 60 s, so cached clients keep resolving to EU for up to another 60 s after detection — total user-visible failover window ≈ 90 seconds for GeoDNS-routed clients. The US region, already provisioned for 2× its normal share, absorbs the EU traffic (bringing it to 2× load) without exceeding its provisioned headroom — if it had only 1.2× headroom, the same failover would turn one regional outage into two.

When to use it

  • Use when: more than one region exists for genuine latency or redundancy reasons, and a region-level failure is a realistic, planned-for scenario.
  • Avoid: building regional failover before provisioning the survivor region(s) with enough headroom to actually absorb the shift — the orchestration is useless if step 4 fails.
  • Failure scenarios: a long DNS TTL turning a fast detection into a slow user-visible failover (the same trap named at → 94); shifting traffic into a survivor region that then saturates, turning a one-region outage into a global one; a region evacuation runbook that was never rehearsed, discovered broken only during a real disaster.
  • Simpler alternative: for a service that can tolerate longer downtime, a manual, human-triggered regional failover (a documented runbook, executed deliberately) avoids the complexity and risk of a fully automatic system that might fail over on a false positive.

Practice

(process kind — paper/trace exercise; multi-region mechanics have no single-node lab equivalent; 20 min). Using the practical example's numbers, recompute the user-visible failover window if the GeoDNS TTL were lowered to 10 s instead of 60 s, and state what that change costs in return (more frequent re-resolution traffic). Then write a 5-step region-evacuation runbook naming the health-check condition that triggers it and the headroom check that must pass before traffic is shifted. Done when your recomputed window matches direct arithmetic and the runbook names an explicit headroom check as a precondition.

Shared lab setup

Key takeaway

Regional failover is → 94's routing mechanics applied to a confirmed region failure — detect, drain, shift — and it only works if the surviving region already has the headroom to absorb the shift. Done when you can: compute a failover window from detection time and routing-mechanism reaction speed, and name the headroom precondition a region evacuation runbook must check. Used next in → 142 (multi-region data architecture, what must stay consistent across this shift), → 207 (production readiness, where a rehearsed regional failover is a launch gate).

References

None — this topic makes no external claims.

Source directory

Search the guide