<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj" -->

---
title: Scaling Figma&#x27;s Database Stack: A Journey of Horizontal...
description: Figma achieved a 100x growth by scaling their databases using techniques like caching, read replicas, vertical partitioning, and horizontal partitioning. They...
canonical: https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Scaling Figma&#x27;s Database Stack: A Journey of Horizontal Sharding and Logical Replication | daily.dev
og:description: Figma achieved a 100x growth by scaling their databases using techniques like caching, read replicas, vertical partitioning, and horizontal partitioning. They...
og:url: https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj
og:image: https://api.daily.dev/og/posts/LtNqWBgNj.png
og:image:alt: Scaling Figma&#x27;s Database Stack: A Journey of Horizontal Sharding and Logical Replication
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaling Figma's Database Stack: A Journey of Horizontal Sharding and Logical Replication

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 3 upvotes · 0 comments

## Summary

Figma achieved a 100x growth by scaling their databases using techniques like caching, read replicas, vertical partitioning, and horizontal partitioning. They faced challenges with inefficient queries and implemented code rewrites and schema changes. They also used PostgreSQL views and a custom query proxy for sharding.

## Content

In recent years, Figma has undergone an impressive transformation, scaling their databases by a staggering 100x. This article explores the strategies and challenges encountered by Figma's databases team throughout this remarkable journey.

Figma's scaling efforts encompassed a range of techniques, including caching, read replicas, vertical partitioning, and horizontal partitioning. Each approach played a critical role in achieving the desired level of scalability.

One of the major challenges Figma faced was dealing with inefficient queries. To address this, they engaged in code rewrites and made schema changes to optimize their database performance. Implementing transactions was another hurdle that required careful consideration.

When it came to horizontal partitioning, Figma made a significant decision. Rather than relying on a NewSQL provider, they took on the task themselves. This decision allowed them more control over the process and ultimately proved successful.

Choosing the shard key was a crucial step in the horizontal partitioning process. Figma carefully evaluated various factors to make the best selection. They also encountered the need for logical and physical sharding, both of which presented unique considerations.

Figma's success in scaling their first horizontally sharded table was a significant milestone. Remarkably, they achieved this without any regressions in latency or availability, showcasing the effectiveness of their approach.

Throughout the scaling journey, Figma's databases team leveraged PostgreSQL views and a custom PostgreSQL query proxy, DBProxy. These tools were integral to implementing logical and physical sharding and contributed to the remarkable growth of Figma's database stack.

In conclusion, Figma's database scaling endeavor demonstrates the immense dedication and strategic thinking of their databases team. Through a combination of caching, read replicas, vertical partitioning, and horizontal partitioning, they achieved an incredible 100x growth. This success not only speaks to Figma's technical prowess but also provides invaluable insights for companies looking to scale their databases effectively.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Scaling Figma's Database Stack: A Journey of Horizontal Sharding and Logical Replication","url":"https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj"},"datePublished":"2024-03-15T23:36:14.157Z","dateModified":"2024-03-17T01:03:06.471Z","description":"Figma achieved a 100x growth by scaling their databases using techniques like caching, read replicas, vertical partitioning, and horizontal partitioning. They...","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/scaling-figma-s-database-stack-a-journey-of-horizontal-sharding-and-logical-replication-ltnqwbgnj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Scaling Figma's Database Stack: A Journey of Horizontal Sharding and Logical Replication"}]}
```

