LESSON 08 · Regional resilience

Serve more than one region

Route users near a healthy data center and keep required data available there.

SYSTEM VIEW

The architecture

Diagram view
Healthy regions—
Writes lost—
Region B load—

Watch users find a nearby region, then follow them when that region fails.

  1. A geo-aware DNS service, GeoDNS, answers a lookup with the address of a nearby data center. This user is near Region A, so their requests go there. Users near Region B are sent to B.

    What changed

    • Lookup answered with Region A
    • Each region serves nearby users
  2. Region B can take over only if it holds the data too. Copies between regions usually go asynchronously, because waiting about 100 ms on each write is expensive. Region A confirms a write at once, and B catches up, here about a second behind.

    What changed

    • Async copy from A to B
    • B about 1 s behind A
  3. A major outage takes out Region A. Writes it confirmed in the last second never reach Region B, so a one-second lag loses about a second of confirmed writes. Users still sent to A get no answer.

    What changed

    • Region A
    • About 1 s of confirmed writes
  4. GeoDNS failover routing now answers lookups with Region B. DNS moves slowly: with a 60-second TTL, many clients switch within minutes, but some resolvers hold old answers for longer, so their users keep being sent to A and get no answer.

    What changed

    • GeoDNS answers Region B
    • Some resolvers keep old answers
  5. Region B now carries everyone. If each region ran at 60% of capacity, the survivor faces 120% and overloads. To absorb a full failover, each must stay below 50%, so you pay for about twice what a normal day needs.

    What changed

    • Region B carries all traffic
    • Its load doubles
    Load per region
  6. Failover needs both traffic routing and usable data. Here A stays up, so its last writes reach B before DNS sends A’s users there on purpose. Rehearsing this, as Netflix has publicly described doing for an entire AWS region, proves the healthy region actually works and can absorb the load.

    What changed

    • Region A healthy, evacuated on purpose
    • Data copied, then DNS answers B
    • Proof that Region B can take the load

Space plays · ← → step · Home resets

THE IDEA

How it works

A geo-aware DNS service, often called GeoDNS, answers a lookup with the address of a nearby data center. Amazon Route 53, for example, supports latency-based and failover routing. During a major outage, traffic must move to a healthy region that has enough capacity to receive it. DNS moves slowly: with a 60-second TTL, many clients switch within minutes, but some resolvers hold old answers for longer.

Capacity is the first trap. If two regions each run at 60% of their capacity, the survivor of a regional failure faces 120% and overloads. To absorb a full failover, each must normally stay below 50%, so you pay for about twice what a normal day needs.

Routing is only part of failover. If needed data exists only in the failed region, requests can still fail. Regions need an explicit data synchronization strategy. Cross-region replication is usually asynchronous, because waiting about 100 ms on each write is expensive. As an example, a lag of one second means a failover can lose about a second of confirmed writes. Letting both regions accept writes keeps each one writable, but two people can then change the same record, so conflicts need a rule.

Deployments must be tested in each location so the supposedly healthy region actually works. Netflix has publicly described evacuating traffic from an entire AWS region to prove the others can absorb it. Most products do not need this: running across availability zones, separate facilities within one region, handles common failures at far lower cost.

DECISION POINT

Two regions each run at 70% of capacity, and leadership wants the product to survive losing either one. What do you tell them?

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • Regional failover needs both traffic routing and usable data.
  • Cross-region testing and consistent deployment are part of the design.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 2
DiagnoseQUESTION 01

Region A fails; DNS routes users to B, but some records are absent. What was overlooked?

Choose an answer. You’ll see the explanation once you get it right.

Next lesson

0 of 2 checkpoints answered correctly to complete this lesson.