← Lessons

quiz vs the machine

Gold1460

Databases

Geo Partitioning

Pinning rows to regions to cut latency and satisfy data residency.

5 min read · core · beat Gold to climb

Data Near Its Users

In a global database, keeping every replica spread worldwide makes writes slow because a majority must span continents. Geo partitioning pins each row to the region where its users and laws live.

How It Works

  • A column such as region decides where a row physically lives.
  • Rows for European users place their replicas in European datacenters.
  • Reads and writes for those users stay local, avoiding cross ocean latency.

This is driven by a partitioning policy that maps partition values to replica placement zones.

Two Wins

Geo partitioning serves two goals at once. Performance improves because the Raft majority is local, so commit latency drops. Compliance improves because residency laws often require personal data to stay within a jurisdiction, and pinning replicas there satisfies the rule.

Key idea

Geo partitioning pins rows to regions by a partition column, giving both local low latency commits and compliance with data residency laws.

Check yourself

Answer to earn rating on the learn ladder.

1. How does geo partitioning lower write latency?

2. What compliance need does geo partitioning address?