advanced 2 min answer

A mobility platform wants to place data close to users in many regions. Which data can be replicated and which cannot?

olafly-ioedgereplicationconsistency
Show the full answer Hide the answer

What can be replicated

  • Read-mostly reference data: service areas, pricing rules, vehicle categories, configuration, content. Single-writer with read replicas everywhere gives local latency and a simple consistency story, and writes are rare enough to pay the cross-region round trip.
  • Immutable or append-only data, which has no conflict to resolve.
  • Per-region data with no cross-region invariant, such as a city's driver supply state.

What cannot

Anything with an invariant that must hold exactly across writers: a wallet balance, a trip assignment, an inventory reservation, a sequence.

Global writable replication of these creates concurrent writes to the same entity from multiple regions, requiring conflict resolution — which for an invariant means either losing writes or inventing merge semantics nobody can reason about.

The design that resolves it

Entity homing: partition by entity and give each a home region that owns its writes. Reads served locally everywhere; writes routed to the home.

A regional outage then stops writes for the entities homed there and leaves everything else working — a far better failure profile than a single global primary, and it delivers genuinely local write latency for the majority of users since an entity can be homed near the people who use it.

The decision that must be explicit

Which components fail over automatically and which require a decision. Stateless tiers fail over automatically; a strongly consistent writer should fail over only with a quorum mechanism guaranteeing the old primary cannot accept writes, or with a human confirming the region is gone.

"Automatic failover for everything" is the default that produces split-brain, and for anything financial a split history costs far more than an hour of unavailability.

The evidence to require before going further

A measured latency problem for a real user population, where the round trip is a product issue rather than a preference. "Users elsewhere would be faster" is not evidence until someone has measured what it costs in conversion or abandonment — and multi-zone within one region already survives most infrastructure failures.