How Figma's Databases Team Lived to Tell the Scale | Figma Blog
Our nine month journey to horizontally shard Figma’s Postgres stack, and the key to unlocking (nearly) infinite scalability. Vertical partitioning was a relatively easy and very impactful scaling lever that bought us significant runway quickly. It was also a stepping stone on the path to horizontal sharding. Figma’s database stack has grown almost 100x since 2020. This is a good problem to have because it means our business is expanding, but it also poses some tricky technical challenges. Over the past four years, we’ve made a significant effort to stay ahead of the curve and avoid potential growing pains. In 2020, we were running a single Postgres database hosted on AWS’s largest physical instance, and by the end of 2022, we had built out a distributed architecture with caching, read replicas, and a dozen vertically partitioned databases. We split groups of related tables—like “Figma files” or “Organizations”—into their own vertical partitions, which allowed us to make incremental sca
javascript:throw new Error('React has blocked a javascript: URL as a security precaution.') abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking
related reading
- Making 768 servers look like 1 — PlanetScaleplanetscale.com
- How Notion pulled itself back from the brink of failure | Figma Blogfigma.com
- Scaling PostgreSQL to power 800 million ChatGPT users | OpenAIopenai.com
- How Mozilla’s Rust dramatically improved our server-side performance | Figma Blogfigma.com
- An Overview of Distributed PostgreSQL... | Crunchy Data Blogcrunchydata.com
- Blog — PlanetScaleplanetscale.com
- Keeping Figma Fast | Figma Blogfigma.com
- How to Streamline Your Design System Workflow in Figma | Figma Blogfigma.com
- The lifecycle of a sharded Postgres query — PlanetScaleplanetscale.com
- Herding elephants: Lessons learned from sharding Postgres at Notionnotion.so
- How To Build A Resilient Design Team | Figma Blogfigma.com
- How Spotify’s Design System Goes Beyond Platforms | Figma Blogfigma.com