Google Doc

Design Google Docs’ real-time collaborative editing — multiple users typing in the same document simultaneously and seeing each other’s edits converge correctly.

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01Two people type into the same sentence at once — what must be true afterward?

Both edits survive and every replica converges to the identical document — no lost keystrokes, no divergent copies.

02How live is "live" — polling or push?

Push over a persistent connection: a collaborator’s keystroke shows up in well under a second, character by character.

03Do collaborators see each other, not just the text?

Yes: cursors, selections, and presence — ephemeral state that flows over the same connection but is never persisted.

04Undo - my edits, or everyone's?

Your own only: undo reverses your operations transformed against everything since - undoing a collaborator is a permission violation, not a feature.

05Comments and suggestions - in scope?

Out of scope: they are metadata anchored to ranges, not text operations - a different data model bolted beside the op log.

06How many simultaneous editors before the experience degrades?

Tens work fine; beyond that, sequencing stays correct but cursor noise dominates - cap active editors and admit the overflow read-only.

Out of scopeRich document structure (tables, images) — a plain text editor is assumed · Permissions and sharing levels · Version history UI (the op log enables it, but the UI is out)

Non-functional requirements

01What is the correctness bar for concurrent edits?

Convergence: replicas may transiently differ, but all reach the identical document — the transform function must handle every pair of concurrent operations.

02How fast must my own keystroke feel vs a collaborator’s?

Mine: instant (applied locally before any server round trip). Theirs: under ~500 ms door to door.

03What stops the operation log from growing forever?

Periodic snapshots: the log compacts to a snapshot + recent ops; loading a document is snapshot + replay, not replay-from-birth.

04What is the concurrency shape — many docs or many editors?

Both, differently: tens of editors per document (ordering is per-doc), millions of documents (documents shard cleanly — each is independent).

05What happens on reconnect?

The client replays from its last acknowledged sequence number: server sends missed ops, client transforms its unacked local ops against them, and the doc heals.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • Plain text or rich structure? Rich changes the operation model entirely.
  • How many simultaneous editors should one document support?
  • Is offline editing in scope, or connected-only?
  • Is version history required, or just current state?
  • What is acceptable when two users edit the exact same word — merge or last-writer?
01

Unlock the full playbook for Google Doc

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series