Google Docs' system design

0/4
☰
Google Docs · system design

Google Docs stores a document as a numbered list of changes, not as a file: your browser applies your typing instantly, one place orders each document's changes, and operational transformation shifts each change so every copy ends up the same.

+ The whole system in one paragraph

Google Docs doesn't save a document as a file; it keeps every change, in order. Your browser shows your typing instantly and sends it to one server, which numbers each change and passes it on. When two people type in the same spot, each change is shifted to fit the other (operational transformation), so every screen shows the same text.

100
people working in one Docs file at the same time (Google help, 2026)[8]
50
simultaneous editors when the rewritten editor launched (Apr 2010)[6]
3
kinds of text edit in Google's 2010 model: insert, delete, apply style[2]

In this lesson

4 chapters · ~8 min · a quick check in each

Everything is on this page — just scroll down ↓

Chapter 1 of 4

The whole system

1
Requirements

What it must do — and how well

The promises before any boxes. Yellow: what Docs must do, like many people in one sentence and nothing lost. Blue: how well, like typing that never waits and the same text everywhere.

ⓘ Details & sources

Yellow = what the system must do. Blue = how well it must do it.[1][3][8]

Many people type inthe same sentence,at the same time.See everyone's editscharacter bycharacter.Never lose orscramble akeystroke.Keep every change:version history andrestore.Typing never waitsfor the network.Up to 100 people inone file (2026).Every screenconverges on thesame text.Only people withaccess see a change.
2
Architecture

One letter, from your keyboard to everyone

All of Docs on one page. Your browser applies each keystroke at once; Google's side checks who you are and what you may open, then one server orders every change in the revision log.

ⓘ Details & sources

Left: the browsers. Right: Google's side — the front door, sign-in, permissions and the document's server with its revision log. Click any piece; play a flow.[3][15][14]

Watch it happen:
Google's side2changes5sign-incan open?edits3cursorsappend4apply4persistreplayYour browsereditor + layout in JSOther editorsup to 100 in one fileDocs APIprograms that editGoogle accountswho you areGoogle Front EndTLS, routing, DoSPermissionsZanzibar: who can openPresencewho's here + cursorsmodelDocument serverorders every changeVersion historythe log, replayedCurrent docstate at last revisionRevision logevery change, numberedDurable storagenot disclosedmodel
clientload balancerservicecachedatabasestorageexternal dashed border = simplified model
12345
Step 1 of 5

You type a letter. Your browser turns it into an operation — insert this character at this position — and shows it on your screen at once, without waiting.

Quick check

How does Google Docs keep a document on its side?

Pick one — or just keep scrolling, it's not graded.

Keep going — it's free

Create your free account to unlock the rest of Google Docs's system design, keep your progress and pick up right where you left off.

  1. 2Typing together
  2. 3Offline
  3. 4Growth & failures
Questions & comments

Ask anything about this system, or share how you'd design it.

Log in to join the conversation