Why Replicate: Geographic Distribution
What you'll learn: How placing database replicas in different regions reduces latency for users around the world.
The Distance Problem
Imagine your application serves users in New York, London, and Tokyo, but your single database lives in a data center in Virginia. Every time a Tokyo user reads data, their request must travel halfway around the world and back—adding hundreds of milliseconds of latency. Light and electricity can only travel so fast through fiber optic cables.
Geographic distribution solves this by placing read replicas closer to your users.
How Geographic Replication Works
You maintain your primary database in one region (say, US-East) where all writes happen. Then you create read replicas in other strategic locations:
- A replica in
eu-westfor European users - A replica in
ap-southeastfor Asian users - A replica in
us-westfor West Coast users
Your application routes read requests to the nearest replica based on the user's location. A user in Singapore reads from the Asia replica, experiencing ~20ms latency instead of ~200ms.
The Tradeoff
Writes still go to the primary database, and changes must replicate across regions. This means:
- Reads are fast (local latency)
- Writes have the same latency (still cross-region to primary)
- Slight replication lag between regions (typically seconds)
This pattern works brilliantly for read-heavy applications where most user actions involve viewing data rather than modifying it.
Key Takeaway: Geographic distribution places read replicas near users in different regions, dramatically reducing read latency for globally distributed applications by minimizing physical distance between users and data.