How Figma built a game-engine-grade design tool in the browser
Figma is a design tool where whole teams edit the same file live in the browser. Its canvas is C++ compiled to WebAssembly with a React and TypeScript UI around it, backed by a Rust multiplayer server, a Ruby monolith and a heavily sharded Postgres fleet on AWS.
Figma says its stack looks more like a game engine than a web app. The canvas is written in C++, a language game engines use for its efficiency and control over memory, and compiled to WebAssembly. Moving to WebAssembly in 2017 cut load times by more than 3x.
C++ lacks good libraries for responsive interfaces, so everything around the canvas is built in React and TypeScript.
The multiplayer server that syncs every edit was first written in TypeScript on Node.js. As Figma grew, its single-threaded design meant one slow operation could block everyone on a worker, and garbage collection caused unpredictable latency spikes.
In 2018 the team rewrote the performance-sensitive part in Rust, running as a child process per document, while network handling stayed in Node.js. Rust gave low resource usage and safety without C++'s rough ergonomics.
In 2020 Figma ran a single Postgres database on AWS's largest instance. By late 2022 it had split into about a dozen vertically partitioned databases on Amazon RDS, but some tables had reached terabytes and billions of rows, so in 2023 the team shipped horizontal sharding behind a new Go service called DBProxy.
They considered CockroachDB, TiDB, Spanner and Vitess, plus NoSQL. Switching would have meant a risky data migration and losing years of Postgres expertise with only months of runway left, and NoSQL lacked the relational flexibility they relied on.
Figma's services already ran in containers on AWS ECS, but ECS was adding complexity: no StatefulSets for etcd, no easy way to run Helm charts like Temporal, and slow load balancer changes during emergencies. In 2023 the team moved to EKS, and by January 2024 the monolith and the multiplayer services were running on three active clusters.
They kept the developer interface the same: services are defined in one Bazel config and CI generates the Kubernetes YAML. Node autoscaling with Karpenter brought costs down.
Figma's prototype viewer and mobile playback engine were written in Skew, a compile-to-JavaScript language built in-house. It was hard for new hires to learn and didn't integrate with the rest of the code.
Once mobile browsers supported WebAssembly and hot paths could move to the C++ engine, Figma wrote a Skew-to-TypeScript transpiler and migrated in three phases without pausing feature work. TypeScript became the source of truth in 2024.