Part 6 · 1 chapters · ~8 min
Multi-Region and Global
Active-passive, active-active and regional-sharding topologies, conflict resolution with last-writer-wins, CRDTs and application merge, Spanner and TrueTime, CockroachDB and YugabyteDB, Aurora's log-is-the-database design, Neon and PlanetScale, and data residency as a placement constraint.
16
Topologies and conflict resolution
| topology | writes | conflicts | fits |
|---|---|---|---|
| active-passive | one region | none | DR; most products |
| active-active, multi-writer | any region | must be resolved: LWW, CRDTs, or app merge | data that merges naturally (carts, likes), rarely money |
| regional sharding | each record in its home region | none for local data | multi-country products, residency |
| consensus-replicated (NewSQL) | any region, consensus per range | none (serialisable), slower writes | global strong consistency needs |
Last-writer-wins silently drops concurrent updates and depends on clocks; CRDTs merge automatically for suitable types (Distributed Systems part 10); application merge stores both versions and resolves with domain rules. For balances, none of these: a single authority per account.
GLOBAL DATABASES, ONE IDEA EACH
what each system bet on
swipe the figure sideways, or tap expand for full screen
1/6
Spanner
Spanner assigns commit timestamps and waits until TrueTime's uncertainty interval has passed (commit wait, a few ms), giving external consistency across continents.
bounded clock error buys global orderingcommit wait: a few ms per write