25 / 25 · Operations and recovery
Multi-region setup
A multi-region design runs required components in more than one geographic region. It can support regional recovery or lower user latency, but distant data coordination adds latency, consistency and operational trade-offs.
What you will practise
- Separate read/write topology
- preserve seat ownership
- plan failover and failback
Before you start: Write owner, replication lag and network partition.
About 5 minutes · offline-generated English female narration · captions included. Diagrams are conceptual; timings are illustrative.
Download MP4CaptionsListen without the video
Download audioChapters and full transcript
Let us understand multi-region setup. A school keeps a working campus in another city. Classes can move after a local disaster, but both campuses must agree which student records are current. If both sell the last seat in the same bus independently, simply having two campuses creates a conflict instead of solving it. A multi-region design runs required components in more than one geographic region. It can support regional recovery or lower user latency, but distant data coordination adds latency, consistency and operational trade-offs.
Follow the normal path. Decide whether another region is for disaster recovery, nearby reads or active writes. Each operation can have different latency, availability and consistency requirements. Region A sends changes toward Region B. Asynchronous copying can lag; synchronous coordination adds waiting and depends on the communication path. SeatSpot might serve public catalog reads near users in two regions while keeping seat reservation ownership in one write region. Choosing active-active writes requires an explicit conflict/coordination strategy, not merely deploying the same containers twice.
Now change one condition. The regions cannot communicate. Allowing both to confirm the same last seat independently can violate correctness even though both applications are running. A common misunderstanding is this: Two regions automatically double availability with no trade-off. Distant coordination adds latency and failure choices; shared dependencies can still fail both. Think about this. Two disconnected regions each see the same last seat. Can both confirm it independently while preserving uniqueness? Pause the video and make your prediction. No. Use a clear owner or coordinated decision, or choose a product model that explicitly accepts and reconciles conflicts.
Let us reason with a concrete example. Two regions can both see one remaining seat while cross-region communication is interrupted. If both independently confirm the seat, availability was preserved but the uniqueness invariant was broken. Preventing that requires a single owner, coordinated decision or a product model that explicitly tolerates/reconciles conflict. Keep authoritative seat allocation under a clear ownership/consistency rule. Use regional catalog caches separately and test failover and failback with realistic lag. These figures are teaching examples, not production guarantees.
Turn the idea into a design decision. A safe failover establishes which writer owns new decisions and prevents the old writer from conflicting. Routing alone does not settle database ownership. Direct eligible traffic to the recovery region and validate the actual booking workflow. Its capacity, credentials and dependencies must work independently enough for the failure scenario. When you try the practice task, look for this result. A second region is useful only if required dependencies and recovery procedures survive the chosen regional failure.
Check your understanding. After recovery, reconcile lag and in-flight work before moving ownership back. Test both failover and failback instead of treating the first traffic switch as the whole plan. Here is a challenge. Both regions can independently book the last seat during a partition. What requirement is missing? Pause before the answer. There is no safe authoritative allocation/coordination rule for the uniqueness requirement. Define ownership, fencing and the partition policy; refuse or defer some writes if necessary rather than double-sell. For an interview, compare per-operation consistency, routing and recovery objectives. Say what you would measure, not only which tool you would buy.
Start with an everyday picture
A school keeps a working campus in another city. Classes can move after a local disaster, but both campuses must agree which student records are current. If both sell the last seat in the same bus independently, simply having two campuses creates a conflict instead of solving it.
Why SeatSpot needs this
SeatSpot might serve public catalog reads near users in two regions while keeping seat reservation ownership in one write region. Choosing active-active writes requires an explicit conflict/coordination strategy, not merely deploying the same containers twice.
Trace one step at a time
Move through the diagram at your pace. Teal paths are active; unavailable components are labelled.
Define the regional goal
Decide whether another region is for disaster recovery, nearby reads or active writes. Each operation can have different latency, availability and consistency requirements.
Read all six mechanism steps
Define the regional goal
Decide whether another region is for disaster recovery, nearby reads or active writes. Each operation can have different latency, availability and consistency requirements.
Copy suitable state
Region A sends changes toward Region B. Asynchronous copying can lag; synchronous coordination adds waiting and depends on the communication path.
Lose the connection
The regions cannot communicate. Allowing both to confirm the same last seat independently can violate correctness even though both applications are running.
Fence and promote
A safe failover establishes which writer owns new decisions and prevents the old writer from conflicting. Routing alone does not settle database ownership.
Route and validate
Direct eligible traffic to the recovery region and validate the actual booking workflow. Its capacity, credentials and dependencies must work independently enough for the failure scenario.
Plan reconciliation and failback
After recovery, reconcile lag and in-flight work before moving ownership back. Test both failover and failback instead of treating the first traffic switch as the whole plan.
Pause and make a prediction
Two disconnected regions each see the same last seat. Can both confirm it independently while preserving uniqueness?
Correct a common misunderstanding
Claim to question: Two regions automatically double availability with no trade-off.
Better explanation: Distant coordination adds latency and failure choices; shared dependencies can still fail both.
Compare regional booking designs
- Draw active-passive and active-active read paths.
- Mark the authoritative owner of each seat and simulate a partition.
- Explain promotion, fencing, lag and return to the original region.
Check what you can explain
This is your self-check, not an automated grade. Try again without the diagram tomorrow.
0 of 3 goals checked. Choose one remaining idea to practise next.
Teach it back
Without looking, explain what this component changes, what it does not solve and what happens if it fails. Use the animation to check your explanation, then switch to Engineering.
Engineering model and trade-offs
Active-passive keeps one site serving while another can take over; active-active serves from multiple sites. These labels must be defined for each operation because reads and writes can have different topologies.
Synchronous cross-region coordination adds distance-dependent latency and can refuse work when required peers cannot communicate. Asynchronous replication allows lag and possible recent-data loss/conflicts after failure. During a partition, state the consistency/availability choice precisely rather than saying pick any two without conditions.
Plan routing, data placement, write fencing, regional dependency independence, failback and drills. A second region that depends on the first region secrets, database or control plane may not survive the failure you intended to tolerate.
Work through an example
Two regions can both see one remaining seat while cross-region communication is interrupted.
Reason with the numbers
If both independently confirm the seat, availability was preserved but the uniqueness invariant was broken. Preventing that requires a single owner, coordinated decision or a product model that explicitly tolerates/reconciles conflict.
Make a decision
Keep authoritative seat allocation under a clear ownership/consistency rule. Use regional catalog caches separately and test failover and failback with realistic lag.
Implementation sketch
Public catalog: regional reads with bounded staleness
Seat allocation: one authoritative owner per seat
Failover: promote only after fencing old writer
Recovery: reconcile lag, route safely, test failbackA conceptual topology, not an automatic cloud failover script. The correct design depends on business invariants, supported storage guarantees and measured recovery requirements.
Where this is used
- Regional disaster recovery with defined objectives.
- Geographically distributed users with explicit data-locality/consistency needs.
Common mistakes
- Calling two deployments an independent multi-region service.
- Ignoring conflicting writes and fencing.
- Promising zero latency or zero data loss without a supported guarantee.
Practise a reasoned answer
Answer aloud or write notes before opening the reference. These prompts teach reasoning and trade-offs; they are not claimed questions from a particular company.
How would you choose active-passive versus active-active?
Choose a practice depth
- Foundation
- Explain why a distant working copy can help.
- Practical
- Compare per-operation consistency, routing and recovery objectives.
- Advanced
- Defend ownership, fencing, partition behavior, failback and regional operating cost.
Self-check rubric
- State the required user outcome and the relevant invariant.
- Explain the normal path and one failure path.
- Name a cost or consistency/latency trade-off.
- Say what you would measure or test before trusting it.
For deeper practice, connect this topic to the previous lesson and identify a shared bottleneck. A longer answer is not automatically a better answer.
Try it before viewing the solution
Both regions can independently book the last seat during a partition. What requirement is missing?
Check one key idea
Your explanation and interview notes
Saved only in this browser when storage is available. Export a backup from the course page before clearing browser data or moving devices.
Loading your local notes…
Official references and next reading
The explanation, fictional examples and animations are original teaching material. Vendor behavior depends on the specific product/version; use its documentation before deploying.