Skip to content
← All concepts

Scale & distribution

Multi-region deployment

Run the system in several geographic regions for lower latency and to survive a regional outage.

Users are routed to the nearest healthy region by geo-DNS or anycast. Data is replicated between regions — asynchronously for most data, carefully for anything that must be strongly consistent.

See it in action

Step through the scenarios on the diagram.

Laying out diagram…

1/4A user in Berlin opens the app.

EU users
— Close to Frankfurt
US users
— Close to Virginia
Geo-DNS
— Routes to the nearest healthy region
EU region
— Full copy of the app
US region
— Full copy of the app
EU database
— Primary for EU users
US database
— Primary for US users

How it works

  • Active-passive: one region serves, another is on standby.
  • Active-active: all regions serve traffic; conflicts must be avoided (partition users by home region) or resolved.
  • Partitioning by region (Uber by city) keeps most traffic local.

Trade-offs

  • Cross-region writes are slow; global strong consistency is expensive.
  • Doubles infrastructure and operational complexity.

Seen in

Components involved

Related concepts