Notion
- Case study
- Databases & storage
- Scaling databases & storage
Herding elephants: Lessons learned from sharding Postgres at Notion
Answers How do you shard a live database with five minutes of downtime?
Notion split its PostgreSQL monolith into 480 logical shards across 32 physical databases. The post explains when to shard, how the layout was chosen, and how the team double-wrote, backfilled and verified data before…
- The problem
- Notion’s single Postgres database was approaching its limits as usage grew.
- What they did
- The team sharded data into 480 logical shards on 32 databases, double-writing and backfilling before switching.
- The result
- The switchover took five minutes of scheduled downtime and made Notion noticeably faster.
Why read it A practical, numbers-first walkthrough of a database sharding migration.