Skip to content
SD-37 · COLLABORATIVE DOCUMENTS · INTERACTIVE

Break it.
Then fix it.

Bring more editors online, watch what melts, and add the parts a real document service needs. Every switch is a decision you would defend in an interview.

CHALLENGEServe 1.5M editors online with edits reaching others in under 200 ms, no dropped edits, and every document with exactly one owner.
StatusDOWNAt 100K editors online
Edit to others, p99500+ msTarget under 200 ms
Open a document2,000+ msReplays the whole op log
Dropped edits85%Two owners: documents drift apart
Monthly cost$5,10016 collab · 0 gateways
EditorsLIVE
100K online · 7.0K typing
70K edits/s
Collab servers × 16SPLIT
Also holding every socket
110K / 160K units/s
Op logDOWN
70K appends/s
6.7M ops replayed/s
Two servers are editing the same document. With 16 servers and nothing deciding who owns what, an editor on one gateway and an editor on another can reach different servers for one document. Each orders edits its own way and the copies drift apart. Give every open document one owner through a lease.
7%Editors typingMost people with a document open are reading, so 1.5M online is about 105,000 typing.
5×Fewer messagesOne batch in flight cuts 10 keystrokes a second to at most 2 messages.
1Owner per documentOne server orders a document’s edits, so every copy converges.
10 sLease lengthA dead owner’s documents move to another server within about 10 seconds.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.