DEV Community

Cover image for System Design 0-to-1: How WhatsApp Scales to 2 Billion Users (Ep. 1)
Hrishikesh Dalal
Hrishikesh Dalal

Posted on

System Design 0-to-1: How WhatsApp Scales to 2 Billion Users (Ep. 1)

The Hook: The $19 Billion Secret

Imagine you’re running an app with 2 billion active users. How many engineers do you think you’d need? 2,000? 5,000?

When Facebook bought WhatsApp for $19 billion, the world was shocked to find they had a team of just 50 engineers. That is one engineer for every 40 million users. 🤯

They didn't achieve this by writing "perfect" code. They achieved it through System Design.


1. Meet the Characters: The Client & The Server

Every story in tech revolves around two main characters: The Client and the Server.

  • The Client: This is the requester. It’s the phone in your pocket or the browser you're using to read this post. It’s always asking, "Hey, can I see that video?" or "Send this message".
  • The Server: This is the provider. It’s a powerful computer sitting in a data center, staying awake 24/7 to listen for those requests. It finds the data and sends it back as a Response.

In the beginning, this relationship is simple. One request, one response. Everything is fast.


2. The Conflict: The "Traditional" Server Limit

So, why can't we just use one big server forever?

Traditional servers hit a "Hardware Wall." They use Threads to talk to users. Think of a thread like a single conversation. A standard server can only hold so many conversations at once before it runs out of memory or CPU power.

When your app goes from 10 users to 10,000, those conversations pile up. The server becomes Overloaded, and that’s when the app crashes.


3. What is System Design, actually?

As developers, we care about how a feature works (the logic). System Design is about how the app stays alive.

Think of it as the "Architecture" of software. If coding is like choosing the furniture, System Design is like designing the blueprint for a 100-story skyscraper. It’s the art of choosing the right building blocks—like Load Balancers, Databases, and Caches—to make sure your app scales seamlessly.

The Core Goal: Scalability

System Design exists to solve one problem: Growth. It ensures that whether you have 10 users or 2 billion, the experience remains the same.


What's Next?

I’m on a journey to learn System Design from scratch over the next few days, and I’m taking you with me.

Tomorrow, we tackle the first big architectural choice every growing app faces: Vertical vs. Horizontal Scaling. (Basically: Do you buy a bigger computer, or just buy more of them?)

Drop a comment below: What’s the most complex system you’ve ever tried to build?

Top comments (0)