MentorNode
Start free
Data, Storage & ConsistencyHarddesign-multi-region-replication

Design Multi-Region Active-Active Replication

Design a system that accepts writes in three regions at once, keeps them converging, and survives losing an entire region — deciding explicitly what CAP property to give up.

Active-ActiveConflict ResolutionCRDTsGeo-PartitioningFailover
Traffic & Capacity Estimates:

3 regions · 120ms inter-region RTT · RPO under 1 second · RTO under 60 seconds

Functional Requirements

  • •Accept reads and writes in every region, with local latency for local users.
  • •Replicate asynchronously between regions and resolve concurrent conflicting writes deterministically.
  • •Pin data to a home region where regulation requires it, while keeping the global view coherent.
  • •Fail traffic over to a surviving region without manual data surgery.

Non-Functional Requirements

  • •Local read/write p99 under 20ms — no synchronous cross-region hop on the hot path.
  • •Recovery point objective under 1 second of replicated writes.
  • •The system must state, per data class, whether it chooses consistency or availability under partition.

Back-of-the-Envelope Math

  • 120ms cross-region RTT means a synchronous quorum write costs at least 120ms — a hard floor no tuning removes.
  • 1 second RPO at 50k writes/s means up to 50,000 writes may be unreplicated when a region is lost.

Key Architectural Trade-offs

  • Single-writer-per-partition (no conflicts, remote users pay latency) vs true active-active (local latency everywhere, conflicts become your problem).
  • CRDTs and last-write-wins converge automatically but only for data whose merge semantics you can define — counters and sets, rarely invoices.
  • Geo-partitioning by user home region sidesteps most conflicts and complicates every query that crosses regions.

Click or drag a component onto the canvas, then connect the handles to draw the data flow.

3 nodes · 2 edges

Components · 35

Client & Edge4
Compute & Gateway7
Storage & Caching11
Messaging & Streaming6
Coordination & Ops5
Intelligence2
Canvas overview