Gmail HLD: Storing Billions of Mailboxes and Threading Conversations
How an email service works inside: accept-fast ingestion, the shared message store plus per-user mailbox index, conversation threading by reply headers with union-find, and per-user search.
You reply to a thread that's been running for two weeks. Fourteen messages — you, your manager, three colleagues, a forwarded PDF buried somewhere in the middle — and your inbox shows the whole thing as a single line: "You, Priya, +3 (14)". Tap it and the fourteen unfold in order, quoted replies nested neatly, newest at the bottom. Nobody wrote those fourteen as one document. They landed on different days, from different servers, sometimes out of order — a reply arriving before you'd even received the message it answered. Yet the service folded them into one conversation without reading a sing…
What’s inside
Read this one free
Sign in and your first premium article is on us — read Gmail HLD: Storing Billions of Mailboxes and Threading Conversations free.