Catalogue / figma-2024-postgres-horizontal-sharding

Figma builds tailored horizontal sharding on RDS Postgres using colocated shard keys, Postgres views and a Go query proxy

Figma, 2024. Horizontally sharded RDS Postgres database stack.

Organisation
Figma
Evidence
Reported from production
Source
How Figma's databases team lived to tell the scale

Figma Blog, published 2024-03-14

Records

Decision#d1

Build tailored horizontal sharding on existing RDS Postgres instead of moving to distributed SQL or NoSQL

Decision#d2

Colocate related tables under existing domain shard keys and hash keys for uniform routing

Decision#d3

Decouple logical sharding via Postgres views and dedicated poolers from physical splits using full logical replication

Decision#d4

Build a Go SQL-routing proxy (DBProxy) supporting a 90% query subset selected via shadow planning on live traffic

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free.