Study a WhatsApp-style messaging system design prompt covering durable message storage and near real-time delivery. The question targets conversation models, WebSocket fanout, offline sync, ordering, idempotency, group messaging, and operational metrics.
Design a messaging system similar to WhatsApp. Users should send one-to-one and group messages, receive messages in near real time, and recover message history after reconnecting.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
### Constraints & Assumptions
- The design should cover core messaging, not every social feature.
- Messages must be durable.
- Online users should receive low-latency delivery.
- Offline users should receive messages when they reconnect.
### Clarifying Questions to Ask
- Are end-to-end encryption and media attachments required?
- What scale should be assumed for daily active users and messages per second?
- Are read receipts and typing indicators required?
- What ordering guarantees are needed within a conversation?
- How long should message history be retained?
### What a Strong Answer Covers
```premium-lock What a Strong Answer Covers
```
### Follow-up Questions
- How would you add read receipts?
- How would you handle a user sending the same message twice?
- How would you scale a group with thousands of members?
- What changes for end-to-end encryption?
Quick Answer: Study a WhatsApp-style messaging system design prompt covering durable message storage and near real-time delivery. The question targets conversation models, WebSocket fanout, offline sync, ordering, idempotency, group messaging, and operational metrics.
Design a messaging system similar to WhatsApp. Users should send one-to-one and group messages, receive messages in near real time, and recover message history after reconnecting.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
Constraints & Assumptions
The design should cover core messaging, not every social feature.
Messages must be durable.
Online users should receive low-latency delivery.
Offline users should receive messages when they reconnect.
Clarifying Questions to Ask Guidance
Are end-to-end encryption and media attachments required?
What scale should be assumed for daily active users and messages per second?
Are read receipts and typing indicators required?
What ordering guarantees are needed within a conversation?
How long should message history be retained?
What a Strong Answer Covers Premium
Follow-up Questions Guidance
How would you add read receipts?
How would you handle a user sending the same message twice?
How would you scale a group with thousands of members?