← Lessons

quiz vs the machine

Platinum1820

Databases

Active Active Replication

Multiple regions accepting writes at the same time.

6 min read · advanced · beat Platinum to climb

Writing Everywhere

In active active replication, every region accepts both reads and writes. Local users get fast writes because they never cross to a distant home region. Each region then propagates its changes to the others. The price is that two regions can modify the same data concurrently, producing conflicts.

The Conflict Problem

Because writes are accepted independently, two regions can set the same key to different values before they exchange updates. The system must resolve the divergence deterministically so all regions converge on one value.

Resolution Strategies

  • Last write wins Pick the update with the latest timestamp. Simple but silently discards a concurrent write.
  • Conflict free replicated data types Structure data so merges are mathematically commutative and converge without losing updates, such as counters and sets.
  • Application merge Surface both versions and let business logic decide, as a shopping cart that unions items.

Consistency Reality

Active active is necessarily eventually consistent across regions. You trade the strong ordering of a single writer for availability and low local latency. It shines for workloads where conflicts are rare or naturally mergeable, and struggles where a strict single value, like a bank balance, must never diverge.

Key idea

Active active replication lets every region write locally for low latency, but concurrent writes create conflicts that must be resolved, leaving the system eventually consistent.

Check yourself

Answer to earn rating on the learn ladder.

1. Why does active active replication create conflicts?

2. What is a downside of last write wins resolution?

3. What consistency does active active provide across regions?