Skip to main content
Pattern

Active–active

Problem

You need HA and scale in multiple regions. Passive standby wastes capacity; leader-follower has one region doing all the writes.

Context

Global user base; each region should accept writes for its local users; regions replicate to each other for redundancy.

Solution

Every region has a full stack — DB, cache, services. Writes accepted anywhere. Cross-region replication propagates writes (async or with conflict resolution). On regional failure, traffic shifts to healthy regions with no downtime.

Trade-offs

  • Conflicts on same-key writes from different regions must be resolved (last-write-wins, CRDTs, or app-level)
  • Cross-region replication lag creates a consistency window
  • 3× the infrastructure cost of single-region
  • Complex operational model — updates must be coordinated across regions

Failure modes

  • Split-brain: regions disagree on a key's value, resolution algorithm produces wrong result
  • Replication lag → write in region A, immediate read in region B fails
  • Cascading regional failure if capacity slack isn't provisioned

When to use

  • Global user base with strict latency requirements per region
  • You need continuous availability across regional outages
  • Read+write locality — most access is regional

When NOT to use

  • Single-region user base
  • Strong-consistency workloads (banking, ledgers) — hard to do active-active correctly
  • Cost-sensitive projects — 3× infrastructure is real money