Design a Collaborative Whiteboard like Figma
Understanding the Problem
🎨 What is a collaborative whiteboard? A collaborative whiteboard is an infinite canvas of shapes (rectangles, arrows, sticky notes, text, freehand strokes) that several people edit at the same time. Excalidraw, Miro and FigJam are whiteboards; Figma applies the same idea to design files. Everyone sees each other's cursors moving live, and a shape dragged on one screen glides across everyone else's.
You may be asked for Figma, Miro or Excalidraw specifically. They are the same problem: a shared set of objects with properties, replicated to every client and edited concurrently. Excalidraw adds a twist we'll cover at the end, which is that its collaboration rooms are end-to-end encrypted, so the server can't read or merge the drawing. Expect your interviewer to zoom in on one question in particular: what happens when two people move the same object at the same time?
Functional Requirements
We'll pin down the scope with our interviewer first. Design tools have endless features, so we'll focus on the shared canvas.
Core Requirements
- Users should be able to create a board and add, edit, move and delete shapes on it.
- Multiple users should be able to edit the same board at the same time and see each other's changes in real time.
- Users should be able to see other users' cursors and selections live.
- Users should be able to undo and redo their own changes.
Below the line (out of scope)
- Comments, export to PNG/PDF, templates and plugins.
- Sharing and permissions (we'll assume an authorization service, see
/system-design/authorization-service). - Design-tool specifics like components, constraints and auto-layout.
Non-Functional Requirements
Ask about scale and feel. For our design: 10M daily active users, about 1M boards open at once at peak with an average of 3 people each, and boards of up to 10,000 elements with up to 50 simultaneous editors (and more viewers, say at a workshop).
Core Requirements
- Changes and cursors should reach other users in under ~100 ms in the same region, and motion should look smooth, not jumpy.
- Every client must converge to the same board state.
- Local edits must apply instantly; the UI never waits for the server.
- A change the server has acknowledged must not be lost.
- Opening a large board should take a couple of seconds at most.
Below the line (out of scope)
- Multi-region editing of one board; a board is served from one region.
- Real-time collaborative editing inside a long text block (that's
/system-design/google-docs).
Now the math that shapes the design. A mouse produces a move event about 60 times a second. If 3M connected users each streamed every pointer event, and even a third of them were moving their mouse at any moment, that's about 60M messages per second coming in, each fanned out to the other people on the board. Durable edits are tiny by comparison: a user who drags a shape for two seconds generates 120 pointer events but only one change we actually need to store, the final position.
The insight: a whiteboard has two very different kinds of traffic. Ephemeral state (cursors, in-progress drags, selections) is huge in volume, worthless a second later, and fine to drop. Durable state (the final shape properties) is small, must be ordered and must never be lost. Treating them the same way is the most common mistake in this question.