Multi-Region & Active-Active Design
You'll learn to
- -Distinguish active-passive from active-active multi-region
The Availability Patterns chapter introduced active-active as a resilience technique: multiple copies serving traffic so no single failure takes the system down. Applied at a global scale, the same pattern gets a second job: not just surviving failure, but keeping latency low for users no matter which continent they're on.
GeoDNS and Anycast Routing
A GeoDNS service resolves the same domain name to a different IP address depending on where the request is coming from: a user in Tokyo gets routed to the Asia region, a user in Berlin gets routed to the EU region. This is the global-scale sibling of the CDN routing from Module 1, applied to entire application regions instead of just static assets.
GeoDNS routes each user to whichever region is geographically closest.
Conflict Resolution at Global Scale
The same challenge from the Availability Patterns chapter returns, magnified: if a user's data can be written in any region, two regions can receive conflicting writes to the same record within milliseconds of each other, before either has heard from the other. Resolution strategies range from simple (last-writer-wins, using a synchronized clock or logical timestamp) to sophisticated (CRDTs, data structures mathematically designed so concurrent updates always converge to the same result without coordination).
Two users in different regions edit the same shopping cart within the same second, while the regions are briefly partitioned. How should the conflict resolve?
"Whichever write reaches the database first wins."
"That's effectively last-writer-wins by arrival order, which can silently drop one user's edit with no way to tell them it happened: fine for some data, not others. For a shopping cart specifically, merging (union of items added, rather than picking one write as 'the winner') usually matches user intent better, which is exactly the kind of per-data-type judgment call CRDTs are designed to make principled rather than accidental."