Part 10 · Blueprint 64
Multi-Region Active-Active Architecture & Disaster Recovery
14 min reading · Sources · Editorial review pending
Routing to a surviving region does not manufacture capacity or recover unreplicated state.
Page details
Published date · Last edited:
Draft edition. Editorial review and supplementary reading recommendations are still being completed.
Format: Architecture walkthrough. Prerequisites: the beginner bootcamp. Chapter prerequisites: Consistency Models: CAP, PACELC & Linearizability, Replication, Consensus & Automated Failover, Distributed Consensus: Raft & Multi-Paxos.
Sixty-second mental model
Problem: Routing to a surviving region does not manufacture capacity or recover unreplicated state.
Use: Choose ownership, recovery objectives and survivor headroom together.
Design boundary: State which region owns conflicting mutations and how the service recovers during partition. Active-active reads do not require unrestricted active-active writes for every invariant.
Layer 1 · Intuition
Hypothetical scenario: Northwind is designing multi-region recovery. Maya represents product requirements, Dev implementation and Priya reliability. The team must agree what one regional request means and which component owns the regional write ownership.
Think of regional branches with a tested evacuation plan. Separate the requester from regional write ownership, then identify the retained evidence needed after failure.
- Authority
- The entitled state owner.
- Invariant
- A rule preserved across concurrency and failures.
- RPO
- Recovery point objective: the targeted bound on recoverable data loss, commonly expressed as time. Analogy: How much recent ledger history the recovery plan may lose.
- RTO
- Recovery time objective: the targeted time to restore a defined service after disruption. Analogy: How long the plan allows before the counter resumes service.
- SPOF
- Single point of failure: a component whose failure can disable the relevant service. Analogy: The only key to the building.
Architecture and worked reasoning
Design boundary: State which region owns conflicting mutations and how the service recovers during partition. Active-active reads do not require unrestricted active-active writes for every invariant.
Responsibilities on the request path
Workload and limiting resource
Hypothetical 5 MB/s of replication traffic and a 30-minute disconnected period create 9,000 MB, or 9 GB, of catch-up data before overhead. At 10 MB/s total replication capacity with 5 MB/s continuing changes, net drain is 5 MB/s and takes another 30 minutes.
Keep the units attached to each intermediate result. The assumptions above describe a hypothetical exercise, not observed vendor capacity. A real capacity decision also needs a measured service curve, skew, recovery traffic and an explicit admission policy for overload.
Mutation or publication path
- Route mutations to the eligible entity authority.
- Replicate with explicit lag/acknowledgement semantics.
- Transfer authority only under a safe epoch/fencing rule.
Observation and recovery path
- Choose local stale or authoritative reads per operation.
- Expose degraded/unavailable modes explicitly.
- Reconcile against the committed history after recovery.
Failure that changes the decision
Hypothetical scenario: Two regions independently confirm a scarce allocation during a partition. Later conflict resolution cannot retract an already fulfilled external promise; choose authority/admission before the split.
Attempt this decision before reading the explanation
Does zero replication lag at one observation establish zero data loss during every failover?
No. Acknowledgement, election, in-flight writes and correlated failures determine recovery. State the actual recovery contract rather than inferring it from one lag metric.
Supporting mechanism analysis
Hypothetical scenario: Northwind. Maya represents product, Dev implementation and Priya reliability. The following workflow develops the underlying mechanism.
Maya: “Available with which data, and what must be reconciled after we use it?”
Separate regional failover from historical restoration. Name the failure being survived, the retained recovery point and the authority needed after the transition. The selected restoration durations are assumptions to derive from, not measured recovery promises.
This distinguishes promotion from restoration. Include the remaining work after data returns, especially external effects that restoring a database cannot rewind.
A standby can help when the current machine or region becomes unavailable. It may not help when valid replication faithfully distributes an unwanted deletion. Retained history and a usable restore process address that second problem. Copies, historical recovery points and operational authority are different assets.
Northwind inventories the database, archived change history, object versions, identity configuration, encryption-key access and the workflow evidence needed to explain external actions. A backup of rows alone may omit the credentials or configuration required to use those rows. Inventory each dependency and identify which failure domain can remove it.
Also define the permitted loss boundary. A recovery point objective expresses the desired limit on lost state under a specified event. A recovery time objective expresses the desired restoration interval. Neither is established merely by naming a region or scheduling backups. Evidence comes from the actual retained positions, dependencies and exercised recovery procedure.
For failover, inspect which accepted changes reached the candidate, which are durable and which are applied. Exclude the old writer before granting new authority. A replica answering health probes cannot establish that it contains the required acknowledged history or can absorb the admitted workload.
For historical restore, choose a recovery target and reconstruct a consistent database state from a suitable base and retained history. PostgreSQL’s continuous-archiving mechanism is one concrete option. Its prerequisites include the needed archive sequence. A missing segment can make a desired point unreachable even when a recent backup file exists.
Hypothetical scenario. Restore a PostgreSQL base backup and the required WAL archive into a fenced recovery environment. Validate the intended recovery position and application invariants before changing traffic. Access to encryption keys, configuration and restore capacity is part of the path, not an assumed free prerequisite.
A regional replica can survive one infrastructure failure while faithfully replaying a logical mistake. Point-in-time recovery serves a different need from promotion. State the selected recovery point and the corresponding uncertainty in accepted changes; an elapsed backup interval alone does not identify exactly which transactions survive.
The payment provider, issued capabilities and clients do not rewind with the local database. An operation recorded after the restore point may already have happened remotely. Recover original operation identities from retained evidence and reconcile before creating replacement effects. Warm caches and gradual admission protect useful capacity during recovery, but neither replaces the old-writer fence.
Hypothetical worked example. Choose a twenty-minute recovery objective. Select eight minutes to obtain and restore a usable base, four minutes for archive replay, three minutes for validation and two minutes for routing and admission changes. Assume these steps are serial for this exercise. Their sum is 8 + 4 + 3 + 2 = 17 minutes.
The nominal remaining margin is 20 − 17 = 3 minutes. That margin must cover any omitted required work; it is not automatically spare capacity. If key access or provisioning was excluded, the estimate is incomplete. Parallel steps could change the path, but only after the procedure establishes which dependencies really permit overlap.
Choose an archive gap of two minutes at the incident boundary and a steady two accepted changes per second, solely for an exposure estimate. Two minutes contain 2 × 60 = 120 seconds. The interval contains 120 × 2 = 240 accepted changes under the fixed-rate model. That count does not prove all were lost; inspect actual positions and other surviving evidence before drawing that conclusion.
Retain the evidence necessary to reconcile accepted operations across the restoration boundary. Determine which external identities, receipts or independent records survive and what the provider permits for lookup and replay. Where evidence is incomplete, expose uncertainty and an authorized recovery path instead of automatically repeating every missing local action.
PostgreSQL’s continuous-archiving documentation describes base backups, retained WAL and point-in-time recovery. Use it to inspect the chosen database procedure. It does not certify object-store consistency, provider reconciliation or the application’s recovery time.
Hypothetical failure scenario. Backup uploads finish successfully, but a restore exercise cannot obtain a required encryption key under the recovery role. Another archive segment is missing. The dashboard reported successful copying while the desired recovery point remained unusable.
Exercise the restore with the actual recovery identity and isolated target. Validate completeness, integrity, supported software versions and the chosen application invariants. A destructive incident should not be the first occasion on which the organization discovers its recovery permissions. Record observed durations and gaps without turning one successful exercise into a universal guarantee.
Layer 3 · Internals
Active-active serving does not require every record to accept concurrent writes in every region. Home-region ownership can keep an entity's mutations under one authority while allowing nearby reads or stateless request entry elsewhere. Moving that ownership needs an epoch, a replication boundary and a rule preventing the old region from continuing to commit.
A disaster-recovery strategy must state recovery point and recovery time objectives separately. Backup/restore, pilot light, warm standby and multi-region active operation trade cost, readiness and coordination differently. If two regions each sustain 700 requests per second and the total load is 1,200, neither region alone can absorb all demand without shedding work or adding capacity. Routing cannot fix that arithmetic. CRDTs can support specific mergeable data types; last-write-wins can discard a legitimate concurrent change and is not a generic correctness solution. A regional evacuation drill should include control-plane dependencies and the survivor's shared downstream limits, not just a DNS change.
Trade-offs and limits
| Approach | Provides | Requires |
|---|---|---|
| Home-region write ownership | Simplifies per-entity ordering and reconciliation. | Distant writes and ownership transfer can add latency. |
| Concurrent regional writes for a mergeable type | Can keep local operation available during some partitions. | The selected merge semantics must preserve the actual domain invariant. |
Recovery decision
Hypothetical scenario: Two regions independently confirm a scarce allocation during a partition. Later conflict resolution cannot retract an already fulfilled external promise; choose authority/admission before the split.
No. Acknowledgement, election, in-flight writes and correlated failures determine recovery. State the actual recovery contract rather than inferring it from one lag metric.
Write your design before revealing the review
Does zero replication lag at one observation establish zero data loss during every failover?
Drafts and self-review are stored only in this browser. They are separate from reading completion.
Compare your decision
No. Acknowledgement, election, in-flight writes and correlated failures determine recovery. State the actual recovery contract rather than inferring it from one lag metric.
Two regions independently confirm a scarce allocation during a partition. Later conflict resolution cannot retract an already fulfilled external promise; choose authority/admission before the split.
Check your understanding
Does zero replication lag at one observation establish zero data loss during every failover?
No. Acknowledgement, election, in-flight writes and correlated failures determine recovery. State the actual recovery contract rather than inferring it from one lag metric.
How would you recover from this failure: Two regions independently confirm a scarce allocation during a partition. Later conflict resolution cannot retract an already fulfilled external promise; choose authority/admission before the split.
Start with the exact boundary that failed. Route mutations to the eligible entity authority. Replicate with explicit lag/acknowledgement semantics. Transfer authority only under a safe epoch/fencing rule. Then recover evidence through the observation path: Choose local stale or authoritative reads per operation. Expose degraded/unavailable modes explicitly. Reconcile against the committed history after recovery. Preserve the distinction between a confirmed state change and an unavailable response.
Which assumption in the worked calculation would a burst or concentrated tenant invalidate first?
Hypothetical 5 MB/s of replication traffic and a 30-minute disconnected period create 9,000 MB, or 9 GB, of catch-up data before overhead. At 10 MB/s total replication capacity with 5 MB/s continuing changes, net drain is 5 MB/s and takes another 30 minutes. Recompute the affected resource rather than multiplying unrelated storage and network budgets by the same factor. State which region owns conflicting mutations and how the service recovers during partition. Active-active reads do not require unrestricted active-active writes for every invariant.
Which component in this topology could be removed from a smaller first deployment?
Regional ingress, Entity authority, Replication stream, Recovery control name responsibilities, not a requirement for separate processes. Co-locate responsibilities when their transaction, trust and capacity boundaries permit it. Route mutations to the eligible entity authority.
What evidence must a caller have before relying on the observation path?
Choose local stale or authoritative reads per operation. Expose degraded/unavailable modes explicitly. Reconcile against the committed history after recovery. No. Acknowledgement, election, in-flight writes and correlated failures determine recovery. State the actual recovery contract rather than inferring it from one lag metric.
45-minute interview rubric
- 00–05: scope regional request and regional write ownership.
- 05–12: identify the limiting resource and derive the domain workload above, retaining units and assumptions.
- 12–28: draw regional write ownership, numbered writes and reads.
- 28–40: challenge recovery: Choose ownership, recovery objectives and survivor headroom together.
- 40–45: defend tenant_id placement, observations and remaining assumptions.
Go deeper
- Disaster recovery options in the cloud - Disaster Recovery of Workloads on AWS: Recovery in the Cloud · Primary document · docs.aws.amazon.com. Choose ownership, recovery objectives and survivor headroom together. Verified 2026-10-26.
- PostgreSQL: Documentation: 18: 25.3. Continuous Archiving and Point-in-Time Recovery (PITR) · Primary document · www.postgresql.org. Choose ownership, recovery objectives and survivor headroom together. Verified 2026-10-26.
Decision log
Choose ownership, recovery objectives and survivor headroom together.
Preserve regional request identity and regional write ownership ownership.
Revisit changed workload, observations or recovery objectives.