Lesson 15 of 17
38. Design a Chat App (WhatsApp)

Variations to practise

3 min read+10 XP

Chapters used

Approach (1), Estimation (2), Blob storage and presigned URLs (11), Replication (14), Sharding (15), Polling vs WebSockets vs push (21), Message queues (22), Pub/sub (23), Idempotency (24), CDNs (26).

Try these variations

Each is a common follow-up. Answer in two minutes, then check the sketch.

  1. "Show 'last seen' and 'typing…'." → Presence from gateway connect/disconnect and heartbeats, published to contacts with throttling; typing indicators are fire-and-forget, never stored (Chapter 21).
  2. "Delete a message for everyone." → A new "delete seq 42" event in the chat; clients that have it hide it; the server drops it if still stored.
  3. "Search my chat history." → With end-to-end encryption, search runs on the device over its local, decrypted history.
  4. "Channels with millions of followers." → One-way broadcast: store once, followers pull (fan-out on read, Chapter 23), no per-follower delivery receipts.