Design a multi-region data replication strategy for high availability
Instruction: Explain how you would design a data replication strategy across multiple regions to ensure high availability and disaster recovery.
Updated
Official answer
Define acceptable data loss, recovery time, read/write latency and which invariants must survive a partition. Choose topology and acknowledgement rules from those requirements, including the capacity needed when a region is unavailable.
A single-writer design simplifies conflict handling but needs fenced promotion and routing during failover. Multi-writer designs require supported concurrency semantics and conflict handling that preserves the business rules. Last-write-wins can discard valid updates; clocks alone do not solve conflicting inventory or financial operations.
Synchronous replication can wait for selected remote acknowledgements at a latency/availability cost. Asynchronous replication allows lag and may lose acknowledged writes when promoting an incomplete replica. Neither label alone specifies transaction isolation, linearizability or application read-after-write behavior; check the engine's documented contract.
Do not assume every global database is active-active. For example, Aurora Global Database uses a primary write region and secondary read regions; write forwarding does not turn secondary regions into independent writers. Verify supported failover and consistency features for the selected engine/version.
Monitor replication progress, stale reads and error/latency budgets. Rehearse network partition, writer loss, stale-client routing, fencing, reconciliation and failback. Keep independently recoverable backups because replication can propagate corruption or deletion. Report measured recovery objectives and remaining failure cases instead of promising automatic availability from geography alone.