← Back to problems

21. Multi-Region Read Replica Design

EXPERT
ConsistencyFailoverMulti-RegionRead ReplicasScalabilitySystem Design

Design a globally distributed read-scaled service where users in multiple regions read from local replicas of a single logical dataset, with writes funneled to a primary and asynchronously replicated out.

Design a read-heavy service serving users in multiple geographic regions from a single logical dataset. Users must get low-latency reads regardless of region, which means each region needs local read capacity : local serving tiers, local caches, and local database replicas : rather than every read crossing an ocean to a single origin. Writes are far rarer than reads and are funneled to a primary region, then replicated asynchronously to the other regions' replicas. The hard part is not the topology but its consequences, which you must reason about explicitly: cross-region replication lag means a user may read stale data or fail to read their own recent write; a regional outage requires failover; and the write path's single-primary design trades write latency for consistency simplicity. Your diagram should express the multi-region, read-replicated structure; your prose must confront replica lag, read-your-writes, failover, and the consistency model. Design the architecture: per-region serving tiers and caches fronting per-region database replicas, with a write path to a primary and replication outward. Then show your latency/capacity calculations, your deployment/failover approach, and the consistency trade-offs.
Log in to submit a solution

Comments

Log into join the discussion.