Design Store-and-Forward Delivery for Offline WhatsApp Recipients
Last updated: November 29, 2026
Quick Overview
Design how WhatsApp holds messages for recipients whose phones are offline, delivers them in order when they reconnect, and deletes them from servers once delivered.
Meta
November 29, 20260
0
0 solved
Design how WhatsApp holds messages for recipients whose phones are offline, delivers them in order when they reconnect, and deletes them from servers once delivered.
WhatsApp's architecture famously keeps messages on servers only until delivery. This question checks queue semantics: durability, per-chat ordering, at-least-once delivery with dedupe, and bounded retention.
What the Interviewer Expects
- Design a durable per-device offline queue
- Guarantee per-conversation ordering
- Explain at-least-once delivery with client dedupe
- Wake devices with push without leaking content
- Bound retention and storage
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What if the phone is offline for 45 days?
- How do you deliver a 10,000-message backlog without freezing the app?
- How does ordering hold when the sender's messages hit different servers?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: messages to an offline device are stored and delivered on reconnect; sender sees 'sent' (one tick) until delivered (two ticks); messages removed from servers after delivery ack.
**Non...
High-Level Design
Sender's message goes to its connected chat server, which looks up the recipient's session. If online, push directly. If offline, append to the recipient device's offline queue in a replicated...