Continue where you left off ×
Figma, the case study
Boards
Everything · Open board
Every board in the set on one canvas, with a single edit’s path drawn across all of them.
Before you start. You need to have used an app where two people type into the same document at once and neither has to wait for the other. This lesson is the story of what one company had to build so that nobody waits.
The idea in 30 seconds
Figma’s founding move was to stop treating a design document as a file somebody owns, and treat it as a stream of edits ordered by one server.
The thing that can collide is a single property of a single object. When two edits hit the same one, the later arrival wins and the earlier is lost.
Because one server referees every document, nothing needs a timestamp: arrival order is the order.
That referee is one process per open document, affordable only once the 2018 rewrite cut memory to roughly a quarter.
Saving is a journal of every edit plus an occasional full checkpoint, which took the risk window from sixty seconds to 95% of edits safe within 600 milliseconds.
Undo cannot be a rewind when other people are editing. It is a new edit that replays your intention against the document as it now is, and every choice above sends a bill like that one later.
Read the story
Lesson 88 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson 2015: a design file was something one person owned The first wall: the browser hands you engines and no knobs The hinge: a document is a stream of edits, and the server is the referee Two designers, one rectangle: last-writer-wins, and why a property is the unit What “save” became: a checkpoint, and a journal of every edit Ctrl-Z when someone else moved it: undo replays your intention 2020: the other database, and nine months to split one table September 2019: the sandbox that leaked, and the nine-day replacement A Browser Inside a Browser Neither OT nor CRDT One Process Per Document Drawing a Letter Without a Font Engine Nine Months to Shard One Table Undo, When Someone Else Moved It The Plugin That Can See Everything The whole machine The numbers that are real What is NOT published (do not invent it) Terms it explains: multiplayer, last-writer-wins, journal, checkpoint, 4.7 months, sharding, sandbox, ~20x faster, 4.2gb → 1.1gb, 82s → 5s, 95% within 600ms, >2.2B changes/day, 33ms (30 FPS), 200, ~3x/year, ~100x since 2020, >65%, ~10%, 14 seconds, ~500 LOC, 9 days, 2GB per browser tab, Branching internals, Cursor and presence channel, memory64 and Spectre, QuickJS overhead, Fleet size, HTML/SVG, Canvas2D, Browser text, is, Not correctness, never `ABC`, Existence, Identity, The tree, Order, exclusive, string, base 95.
Review System Design
Mark as read Saved in this browser, and to your account when you sign in.