Mobile system design · Design
Design a chat app (WhatsApp-like)
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
Design a messaging app like WhatsApp: the client architecture, and enough backend to make it work.
Then
Follow-ups the interviewer asks next
- scale and failure probes, in order:
- "If User A and User B are on different servers, how does the message get from one to the other?"
- "The app is backgrounded on iOS and the socket dies. How does the user get messages?"
- "Ordering and dedupe across reconnects?"
- "A 1,000-member group: fan-out and read receipts?"
- "10k messages in a thread: list performance and pagination upward?"
- "Reconnect storm after an outage?"
The answer
What a strong answer covers
- Requirements (1:1, groups, media, receipts, presence, offline send).
- Client: WebSocket manager with heartbeat and backoff. Local DB (SQLite) as the source of truth. Optimistic send with client ids and a pending, sent, delivered, read state machine.
- Server sequence ids for ordering and gap fill. Push (FCM/APNs) to wake offline devices. Media upload separately with progress.
- Inverted list or FlashList v2
startRenderingFromBottom+maintainVisibleContentPosition. - Backend sketch: user→server routing via Redis, Kafka between servers. E2E encryption keys in Keychain/Keystore.
The red pen
Common traps
Avoid:drawing boxes before asking questions (the post calls this the biggest mistake). Polling.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.