Design a chat app (like WhatsApp or Messenger)
People send messages to one friend or a group, and each one should appear on the other phones in a blink, with ticks for delivered and read, even when phones keep dropping their connection. It's a post office that numbers every letter and keeps a postman standing at each door.
It's also asked as "design WhatsApp" or "design Messenger", and "design Slack" is the same question with channels, whose million-member rooms Real-time delivery works out. The closest case study is Live comments, one message to a huge audience. Interviewers like it because the numbers are large everywhere, and promises about order and ticks must survive servers, and whole zones, dying.
Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.
Step 1 · Clarify the features and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a chat app like WhatsApp.
You: A few questions first. One-to-one and groups? How big a group?
Interviewer: Both. Groups up to 1,000 members.
You: What's in a message, and which ticks do people see?
Interviewer: Text, plus photos and voice notes. One tick for sent, two for delivered, and blue when read.
You: Who's online and typing? And is history kept on our servers, so a new phone or a laptop sees old chats?
Interviewer: Online, last seen and typing, yes. History is kept, and a user can have a phone and a few linked devices.
You: End-to-end encryption?
Interviewer: Leave it for the end.
You: Then I'll cover one-to-one and group messages, attachments by link, the ticks, presence and typing, history across devices, and pushes to closed apps. Out: calls, search, stories and payments. OK?
Interviewer: Good.
Each answer shapes the design: groups mean one message to many devices, ticks mean every device reports how far it got, server-side history makes the store the truth, and linked devices mean routing per device.
Step 2 · Non-functional requirements
Minutes 5–8 · How this step works
You: Say 500 million daily users sending 40 messages each, with 100 million online at peak. A message reaches an online recipient within 200 ms at p99, measured per message. Sending and receiving are 99.99% available. A message is never lost once the sender sees one tick, and every member sees a conversation in the same order. "Online" may lag up to a minute, and typing can be lost.