0 day streak

Multi-region

A multi-region system runs in data centers in several parts of the world, both to keep working if a whole region goes down and to serve users from somewhere nearby. In active-passive, one region handles all the writes and the others hold replicas ready to take over; it’s simpler to reason about, but failover takes time, can lose the last few writes if replication was asynchronous, and faraway users pay the long round trip. In active-active, every region accepts writes, which cuts latency for everyone but means two regions can change the same data at the same moment, so you need conflict resolution or a rule that each record is owned by one region. A round trip between continents takes tens to hundreds of milliseconds, a physical limit, which is why this trade-off can’t be engineered away.

In this lesson: A world map with an active-active vs active-passive failover sim.