← All Problems
HardReal-time45 min

Design a Chat System (WhatsApp)

Design a real-time messaging system similar to WhatsApp supporting 1:1 and group chats with message delivery guarantees.

MetaGoogleMicrosoftSlack

Functional Requirements

  • 1:1 messaging and group chats (up to 500 members)
  • Online/offline status and read receipts
  • Message persistence and history
  • Support text, images, and file sharing
  • End-to-end encryption
  • Push notifications for offline users

Steps (0/6)

Step 1: Clarify Requirements

Scale: 500M daily active users, 50B messages/day. 1:1 and group chat. Message types: text, images, files. Delivery guarantees: sent, delivered, read. Message history stored for 30 days? End-to-end encryption?

Key Points

  • 500M DAU, 50B messages/day → ~580K messages/sec
  • Average message size: ~100 bytes text, media varies
  • Storage: 50B × 100 bytes × 30 days ≈ 15 PB for text
  • Real-time with <100ms latency when both users online
1 / 6