Multi-region: recap and quiz
The module in five sentences
Section titled “The module in five sentences”- Why go multi-region. A second region buys lower latency for users who are far from the first, survival of a regional failure, and a place to keep data that may not leave an area, and it costs idle capacity, data in two places, routing, and a failure path used rarely.
- Active-passive and active-active. In active-passive one region serves and another waits; in active-active every region serves its nearest users, and each must hold the load of a lost neighbour, so the peak over N − 1 is the least and nearest-region routing needs more.
- Replication and conflicts. The lag between regions is the data at risk when one fails, synchronous copies remove it for the price of a round trip, and two writing regions can overwrite each other, which last-write-wins does silently and a merge or a single writer avoids.
- Global traffic routing. GeoDNS decides at lookup time and sees the resolver, anycast decides at every packet, and with DNS the time to move users is the check interval times the failures plus the wait for cached answers.
- Regional failure and evacuation. A lost region takes capacity, time and recent writes, the regions left must be able to carry everything, and the failover has to be rehearsed and independent of the region that failed.
How each one breaks
Section titled “How each one breaks”| Idea | What breaks | What you see | What helps |
|---|---|---|---|
| Reasons | A second region for latency when users are in one place | Cost with no gain | Name the reason; check where the users are |
| Layout | Regions sized for normal traffic only | A region lost, another overloaded, requests refused | Size every region for the worst single loss, with a margin |
| Replication | A failed region holds writes no one else has | Lost recent writes, or write conflicts | A smaller lag, synchronous copies, a single writer or a merge rule |
| Routing | A long TTL, or a check too slow or too eager | Minutes of errors, or a failover on a false alarm | Several checkers, a TTL chosen for the failover time, anycast |
| Failure | A failover that was never tested | A plan that fails when needed | Rehearse it; keep it off the failed region’s control plane |
A checklist for a design across regions
Section titled “A checklist for a design across regions”Each question points back to the lesson that answers it.
- Which reason do you have: latency, availability or residency? If it is latency, where are the users? (Why go multi-region)
- Does one region serve everyone, or does each serve its own users? (Active-passive and active-active)
- If any one region is lost, can the others carry everything? Compute the busiest region left, not the average. (Active-passive and active-active)
- How much recent data can you afford to lose, and what does a smaller lag or a synchronous copy cost? (Replication and conflicts)
- Can two regions write the same record, and what is the rule if they do? Last-write-wins, a merge, or one home region per record. (Replication and conflicts)
- How are users sent to a region, and what does that see: the user or the resolver? (Global traffic routing)
- How long are users stranded: the check interval times the failures, plus the TTL? (Global traffic routing)
- What triggers a failover, a person or a check, and what does a false alarm cost? (Global traffic routing)
- When did you last lose a region on purpose? (Regional failure and evacuation)
Check your understanding
Section titled “Check your understanding”Ten questions cover the whole module. Every option is explained, whether it is right or wrong.
Multi-region: module quiz
This quiz needs JavaScript to check your answers.
Where this goes next
Section titled “Where this goes next”A service that survives the loss of a region still has to say what it promises its callers and how it talks to them. The next module looks at how services communicate, over requests and responses, streams and callbacks, and the later ones at limiting traffic, seeing what a system is doing, and securing it. Ask this module’s questions about any of them: what happens when a region is gone, and what do the callers see?
Your progress
Built by GhaziAlibi.
© ShardCraft. All rights reserved.