Sharding vs partitioning: real examples from Figma, GitHub and Notion

Published 2026-10-19 · Built only from first-party engineering write-ups in our database. Every number below comes from the linked source.

Partitioning splits data into smaller pieces; sharding is partitioning rows across separate database servers. In our database, vertical partitioning means moving whole table groups to their own database, as Figma, GitHub (schema domains) and GitLab (a separate CI database) did. Horizontal sharding splits rows of the same tables across servers, as Figma, Notion, Slack and Shopify did. Figma's posts show both in order: vertical partitioning (2023), then horizontal sharding (2024).

Sharding vs Partitioning: side by side

ShardingPartitioning
Stories in our database116
CompaniesDatadog, Discord, Figma, Meta, Notion, PlanetScale, Shopify, Slack and StripeDiscord, Figma, GitHub, GitLab, LinkedIn and Tiger Data (Timescale)
Published2017–20262016–2023
Stack in these storiesPostgreSQL (4), MySQL (3), Vitess (3), AWS RDS (2)PostgreSQL (3), Ruby on Rails (2), AWS RDS (1), Cassandra (1)
Scale numbers stated in sources118.5M QPS sustained for 16 minutes (PlanetScale); 1.5 PB (Stripe); 1 million QPS (PlanetScale)350 TB+ (Tiger Data (Timescale)); billions of messages (Discord)
Direct comparison storyFigma: The growing pains of database architecture; Figma: How Figma's Databases Team Lived to Tell the Scale(same story)

Verdict

Partition first when whole table groups can move apart. Shard when a single table group outgrows one database. Figma's two posts show that sequence.

Counts are stories in How They Scaled tagged with each side, see the horizontal sharding and vertical partitioning pages. They describe what these teams wrote about, not market share or benchmark results.

The direct comparison

Sharding in other scaling stories

PlanetScale · 2026

118 million queries per second on Neki

PlanetScale benchmarked Neki, its sharded Postgres, with single-shard primary-key point selects. Targeting about 200K QPS per shard, it went from 5 shards (about 1M QPS) to 50 (9.9M QPS, per-shard rate within 0.8%) to 512 shards and 480 routers, sustaining 118.5M QPS for 16 minutes over 1.22 PiB with a p99 of 6.06 ms at the router and about one error per 1.8 million queries. PlanetScale notes the run was read-only, primary-only with no replicas, and had no failover during the measured window.

118.5M QPS sustained for 16 minutes512 shards, 480 routershorizontal shardingbenchmarkinglinear scalabilityPostgreSQLNekiAWS r8g.16xlarge
Stripe · 2024

How Stripe's document databases supported 99.999% uptime with zero-downtime data migrations

Stripe's DocDB and its Data Movement Platform move data between shards without downtime.

1.5 PB99.999% uptimeshardingshard migrationzero downtimeMongoDBDocDB
Shopify · 2024

Horizontally scaling the Rails backend of Shop app with Vitess

Shopify's Shop app adopted Vitess to shard its Rails backend, covering keyspace design and the migration plan.

horizontal shardingdatabase migrationMySQLVitessRuby on Rails
Notion · 2023

The Great Re-shard: adding Postgres capacity (again) with zero downtime

Notion tripled its Postgres fleet by re-sharding with logical replication and careful PgBouncer cutovers, with no downtime.

reshardinglogical replicationzero downtimePostgreSQLPgBouncer
Datadog · 2023

Husky: Exactly-once ingestion and multi-tenancy at scale

A deep dive on how Husky routes, shards and ingests events exactly once across tenants.

exactly-once ingestionshardingmulti-tenancyGoKafkaFoundationDB
PlanetScale · 2022

One million queries per second with MySQL

PlanetScale benchmarked a horizontally sharded Vitess cluster up to one million QPS.

1 million QPShorizontal shardingbenchmarkingMySQLVitess
Notion · 2021

Herding elephants: Lessons learned from sharding Postgres at Notion

Notion split its Postgres monolith into a fleet of logical shards keyed by workspace, using double-writes and backfills to migrate.

horizontal shardingonline migrationdouble writesPostgreSQLAWS RDS
Meta · 2021

ZippyDB: Facebook's key value store

Meta's general-purpose distributed key-value store built on RocksDB, with shard management and configurable consistency.

replicationshardingtunable consistencyRocksDBPaxos
Slack · 2020

Scaling Datastores at Slack with Vitess

Slack's multi-year migration from active-active MySQL pairs to Vitess, so data could be sharded by any key, not only workspace.

2.3 million QPShorizontal shardingdatabase migrationMySQLVitess
Discord · 2017

How Discord Indexes Billions of Messages

Discord built message search on many small Elasticsearch clusters, sharding by guild and indexing lazily through a queue.

billions of messagesshardingqueuessearch indexingElasticsearchPython

Partitioning in other scaling stories

FAQ

What is the difference between sharding and partitioning?

Partitioning splits data into pieces. Sharding is the kind of partitioning where the pieces live on separate database servers. Vertical partitioning moves whole tables; horizontal sharding splits the rows of a table.

Should you partition before sharding?

Figma did: it moved table groups onto multiple Postgres databases first (2023 post), then horizontally sharded (2024 post). GitHub and GitLab describe vertical partitioning without horizontal sharding in the posts we track.

What partitioning examples are there inside one database?

Timescale uses hypertables to partition a 350 TB+ Postgres dataset, Discord partitioned Cassandra messages by channel plus time bucket, and LinkedIn's FollowFeed partitions member timelines.

The best scaling write-ups, weekly

One email a week. No spam.

Subscribe

More comparisons

All comparisons →