~learn.
0:00 / 1:29
Side quest 15 · Figma

The server holding your Figma file dies mid-review

transcript

The server holding a design file stalls. Mid-review. Priya's last two edits were on every screen. Never saved. Are they gone?

Before 2022, Figma saved each file every 30 to 60 seconds. A crash could lose a minute. So they added a journal. Every change, numbered, written every half second.

The journal has every change up to 9,412. Priya's 9,413 and 9,414 were echoed to everyone. But never written down. Half a second is still a gap.

The router hands the file to a new owner. It writes a fresh lock UUID. It loads the last checkpoint and replays the journal after it. Priya's two changes? Never saved, so still in her outbox. Her editor never let go. She reconnects and resends. Duplicates are dropped by change ID.

But here's the catch. The old server was only stalled. It wakes up, thinking it still owns the file. Two owners. Split brain.

It tries its next journal write. Every write is conditional: does your lock UUID still match? It doesn't. Refused. It learns it lost the file, and stops serving it. No message needed.

Keep every change in the outbox until it's saved. Fence the stale owner. Never lose what someone saw.

Full breakdown in the lecture.