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
- The WhatsApp Problem
- Requirements & Core Entities
- API Design with WebSockets
- High-Level Architecture
- Foundation
Message Delivery
- The Offline Message Problem
- Sending Media with Blob Storage
- Message Ordering
- Message Delivery
Scaling to Billions
- The Single-Server Bottleneck
- Horizontal Scaling with Redis Pub/Sub
- Supporting Multiple Devices
- Scaling to Billions
Connection Reliability
- Detecting Dead Connections
- Recovering Lost Messages
- Last Seen & Presence
- Connection Reliability
Putting It Together
- The Complete Architecture
- Putting It Together