Design a chat / messaging service
1:1 and small groups: real-time delivery, history, presence — common follow-up to distributed systems fundamentals.
~26 minDesign interview
Step 0 / 0
Interview script (outline)
- Clarify: 1:1 vs groups, max group size, attachments, search, E2E encryption scope.
- Estimate: DAU, messages/user/day, peak connection churn, storage growth for history.
- Real-time: WebSockets vs long-polling; connection management; sticky routing optional.
- Storage: message log per conversation, pagination, read receipts optional table.
- Scale: fan-out for large groups (different from 1:1); presence service.
- Failure: offline queue, idempotent send, push notifications path.