Free sample lesson · System Design WhatsApp

The WhatsApp Problem

How do you deliver a message from one phone to another, anywhere in the world, in under half a second — for two billion users?

Lesson 1 of the Wondering course System Design WhatsApp

The Scale

WhatsApp handles tens of billions of messages per day across 2 billion users. At peak, that's well over a million messages per second.

Unlike a social feed where content is pushed to many, each message targets a specific set of recipients — and must arrive in order, exactly once.

Three Core Challenges

This system must solve three problems at once:

1. Real-time delivery — Messages should arrive in under 500 milliseconds, feeling instant to both sender and receiver.

2. Offline support — Users go offline constantly. Messages sent while they're away must be waiting when they return.

3. Massive scale — 200 million+ concurrent connections. No single server can hold them all.

Why This Is Different

Most request-response systems handle stateless traffic. A user sends a request, gets a response, done.

Messaging is different. Each user holds a persistent connection to the server. The server must push messages to clients the instant they arrive — not wait for the client to ask.

What We'll Build

Over this course, you'll design a complete messaging platform:

  • Foundation — Requirements, entities, WebSocket API, architecture overview
  • Message delivery — Offline inbox, media handling, ordering
  • Scaling — Redis Pub/Sub, multi-device support
  • Reliability — Heartbeats, lost message recovery, presence
  • Putting it together — The complete end-to-end picture

Each technology is introduced when you need it to solve a specific problem.

Keep going

This is lesson 1 of 14 in System Design WhatsApp. Next up:

  1. Requirements & Core Entities
  2. API Design with WebSockets
  3. High-Level Architecture
  4. The Offline Message Problem
  5. Sending Media with Blob Storage

Start this course free

Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.