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.
Email looks simple from the outside — you get a message, you read it, you reply. Inside, a service like Gmail is juggling three hard problems at once: never lose a message (durability above all), show a mailbox instantly even when it holds a hundred thousand messages, and group scattered replies into one tidy conversation. That last one — conversation threading — is the most interview-worthy piece, because it turns out to be a graph-connectivity problem hiding behind a few email headers. This is the inside of Gmail / Outlook / any mail service. The signature problem is threading: deciding whic…
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.