System Design WhatsApp

How does WhatsApp deliver messages to billions of users in under half a second? You'll design a real-time messaging system from scratch — starting with persistent WebSocket connections, then solving offline delivery, media uploads, message ordering, and horizontal scaling with Redis Pub/Sub. Each component is introduced when a concrete problem demands it: dead connections, lost messages, multi-device support. By the end, you'll see how all the pieces fit into a complete architecture.

5 sections · 14 lessons

Course outline

Foundation

  1. The WhatsApp Problem
  2. Requirements & Core Entities
  3. API Design with WebSockets
  4. High-Level Architecture
  5. Foundation

Message Delivery

  1. The Offline Message Problem
  2. Sending Media with Blob Storage
  3. Message Ordering
  4. Message Delivery

Scaling to Billions

  1. The Single-Server Bottleneck
  2. Horizontal Scaling with Redis Pub/Sub
  3. Supporting Multiple Devices
  4. Scaling to Billions

Connection Reliability

  1. Detecting Dead Connections
  2. Recovering Lost Messages
  3. Last Seen & Presence
  4. Connection Reliability

Putting It Together

  1. The Complete Architecture
  2. Putting It Together

Start learning with Wondering