Part 9 · 1 chapters · ~10 min

Multi-region and Traffic Management

When to run in more than one region and what it costs: steering with DNS, anycast and global load balancers, active-passive and active-active designs and the write problem, data residency with home regions, and failover as a rehearsed procedure that the frontend must also survive.

17

Where requests go, and what each region may do

patternwritesfailovercostfits
single region, multi-zoneone writerautomatic within regionlowestmost products; start here
active-passiveone writer, async replicaminutes; some data at riskstandby capacityregional disaster recovery
active-active, home region per usereach user writes in their homere-home users when a region failshighresidency plus latency, per-country platforms
active-active, global consensusany region, consensus round tripsautomatichighest; slower writesledgers needing global strong consistency
the frontend's part
The client should know its home region (the Platform course, part 1), send requests there directly or through a global load balancer, and handle a short burst of errors and a possible re-authentication during failover without losing a form in progress. Persist drafts locally, retry idempotently, and say what is happening.
MULTI-REGION AND TRAFFIC MANAGEMENT
steering users to the right place, surviving a region, and keeping data where the law says it lives
swipe the figure sideways, or tap expand for full screen
1/6
why
Why go multi-region, honestly: latency (a user in Lagos reaching a server in Ireland pays a long round trip on every request), availability (surviving the loss of a whole region, which is rare but happens), and residency (some data must stay in a country or region). If none of these is a requirement, one region with several zones is usually enough.