Chat System (WhatsApp)

Deliver one-to-one and group messages in real time with offline sync and receipts.

Hard50 minWebSocketsMessage orderingPresence

A chat system like WhatsApp delivers one-to-one and group messages in real time, stores them for offline users, and shows delivery and read receipts. The core challenges are routing messages to the server holding each recipient's connection, ordering, and never losing a message.

Clarify requirements

Functional

  • One-to-one and group chats (groups up to 500 members).
  • Real-time delivery when online; delivered later when offline (with push notification).
  • Message status: sent, delivered, read.
  • Online presence and last seen.
  • Multi-device sync (phone + web) and message history.
  • Media messages via upload (reuse object storage + CDN).
  • Out of scope: voice/video calls; end-to-end encryption design details (mention it).

Non-functional

  • 500M DAU, 50B messages/day.
  • Delivery latency < 200 ms when both online in the same region.
  • No message loss; per-conversation ordering.
  • High availability; mobile networks are unreliable.

Try it first

Set a timer, sketch your own design on paper, then compare it with the reference walkthrough.

50:00

Complete & continue

Defend it out loud

The AI interviewer will probe your design for Chat System (WhatsApp) and score it.

Mock interview