DEV Community

Sergey Panarin
Sergey Panarin

Posted on

A System Design Surprise from WhatsApp 😲

While prepping for system design interviews, I was digging into Cassandra, the distributed database Facebook built. I kept wondering: Cassandra powers message search inside FB itself — that’s literally why it was created — so why doesn’t WhatsApp use it for message search, when WhatsApp messages obviously outnumber FB messages by a huge margin? Think about it: when’s the last time you sent someone a message on Facebook versus WhatsApp? 😀

Here’s the surprise — WhatsApp doesn’t store your message history at all. It’s essentially a message router, with no long-term storage for messages. Meanwhile, on Facebook, you can pull up messages from 15-20 years ago.

I looked into WhatsApp’s architecture history going back to 2009 — the original system was built by engineers from Yahoo using Erlang, a language built for routing workloads and massive numbers of concurrent connections.

Essentially, WhatsApp has always operated like a giant telephone exchange serving 2 billion subscribers, with hundreds of millions connected simultaneously.

The wild part: back in 2011, WhatsApp engineers figured out how to handle 2 million (!) concurrent connections on a single server 💪

Their 2011 stats are genuinely fascinating — around 500 million users, 550 servers, with 150 of those servers handling 1M+ connections each. It’s all in the well-known talk below 👇

How WhatsApp Grew to Nearly 500 Million Users, 11,000 Cores, and 70 Million Messages a Second — High Scalability

Great read for anyone working with distributed systems, high-load architecture, or prepping for system design interviews at FAANG companies.

Top comments (0)