SDE Path

Design a 1:1 Chat App (WhatsApp-scale)

Medium

Build a real-time messaging system supporting one-to-one conversations at WhatsApp scale.

Interviewer

Design a 1:1 Chat App (WhatsApp-scale)

You're designing a 1:1 chat app like WhatsApp or iMessage. Users send and receive messages in real-time, with delivery receipts (sent, delivered, read) and offline message queueing. Messages are end-to-end encrypted on the client; the server stores only encrypted blobs.

Scale assumptions:

  • 2 billion monthly active users (MAU)
  • 500 million daily active users (DAU)
  • 20% of DAU actively chat in any given hour (100M concurrent)
  • Average user sends 5 messages per day (across all conversations)
  • Average message: 150 bytes (text) + 50 bytes (metadata, timestamps, receipts) = ~200 bytes
  • 1-2 second end-to-end latency target (P99)
  • Messages stored for 1 year (archived after, user can retrieve)

Derived numbers:

  • Daily messages: 500M × 5 = 2.5B messages/day ≈ 29K writes/sec average, ~100K peak
  • Concurrent message senders (in peak hour): 100M active users × 0.1 active rate = 10M
  • Message store (1 year): 2.5B/day × 365 × 200 bytes ≈ 182.5 TB
  • Connection count: 500M DAU × 2 devices/user = 1B WebSocket/TCP connections

Sign in to start the interview.

The interviewer grades each stage against a hidden rubric and asks a probing follow-up, mirroring a real system design round. Sessions are capped at 30 turns.