Geo Replication & Multi-Region
Lesson, slides, and applied problem sets.
View SlidesLesson
Geo Replication & Multi-Region
Why this module exists
Geo replication improves user latency and regional resilience, but it introduces hard consistency-routing decisions.
In multi-region systems, every read/write path is a policy tradeoff:
- local and fast,
- global and fresh,
- or unavailable during failures.
Core decision surfaces
A geo request planner must decide:
- which healthy regions to contact,
- whether read and write quorums can be satisfied,
- whether chosen quorum sizes are intersection-safe for current replica set.
Low-latency routing without quorum safety creates stale-read incidents.
Latency-aware quorum routing
Given per-region latency and replica counts, route by ascending latency. The observed latency is usually bounded by slowest selected region.
Tie-breaking must be deterministic; otherwise clients can disagree on route and create unstable tail latency.
Health-aware planning
Only healthy regions can contribute replicas in real-time planning.
Failure mode to avoid:
- planner counts unhealthy replicas toward quorum,
- request starts but cannot actually commit.
Healthy-capacity checks must happen before marking route feasible.
Quorum safety math
Let N be total healthy replicas available for key range. Classic quorum safety conditions:
- read/write intersection:
R + W > N - write/write intersection:
W > N/2
If these are not true, routes may be fast but consistency is not guaranteed.
Typical geo policies
- Latency-first reads with bounded-staleness fallback.
- Write quorum routing that prioritizes local+near regions.
- Safety gating: reject unsafe quorum configurations instead of silently serving inconsistent mode.
These policies should be explicit in planner output.
Common implementation mistakes
- selecting regions by count instead of available replicas,
- ignoring health state in capacity checks,
- assuming route feasibility implies consistency safety,
- non-deterministic region order under latency ties,
- treating read and write route failures as the same condition.
What you will build
Geo Quorum Route Planner (capstone)
- choose read and write region sets by latency among healthy regions,
- compute resulting read/write latency,
- report whether quorum sizes are intersection-safe for healthy replica total.
By the end, you should be able to separate latency feasibility from correctness safety in geo routing decisions.
Module Items
Geo Quorum Route Planner