Design a chat and messaging system — System design interview practice (Advanced)
up to 10 questions · 85 minutes · ₹15
The problem
Design a messaging app like WhatsApp. People send text messages to one person or to a group of up to 256 people. Messages arrive in real time when the recipient is online, are delivered later when they are offline, and show sent, delivered and read ticks.
Phones drop their connection all the time: the design must not lose a message, show one twice or show a conversation out of order. Media (photos, voice notes) can be attached.
Draw the components, how a message travels from sender to every recipient (online and offline), and where each piece of data lives. Add your estimates and the API on cards.
Requirements
What it must do
- One-to-one and group messages (groups up to 256 members)
- Real-time delivery to online recipients; delivery on reconnect for offline ones
- Sent, delivered and read receipts
- Push notification when the recipient is offline
- Message history synced across a user's reconnects
- Photos and voice notes as attachments
How well it must do it
- Send-to-deliver p99 under 500 ms for online recipients
- No message lost once the sender sees "sent"; no duplicates shown
- Messages within a conversation shown in one order to everyone
- 99.99% availability for sending
Scale
500M daily active users, 40 messages per user a day (about 20B a day, peaks at 3x), 200M concurrent connections at peak
Out of scope
- End-to-end encryption key exchange (assume payloads are opaque)
- Voice and video calls
- Stories and status updates
What you'll be asked
You design for 45 minutes on a canvas: components, connections and notes. Then you answer up to 10 questions: 5 about the scenario (what happens under load, when a part fails, as it grows) and 5 about the design you drew. Answer at least 3 to finish; each has about 4 minutes.
Interview format
- Design: 45 minutes on the canvas
- Questions: up to 10 questions, about 4 minutes each
- Time: 85 minutes at most
- Difficulty: Advanced
- Device: best on a laptop or desktop; the canvas needs a wide screen
- Price: ₹15 a test
How it's marked
- Requirements and estimates
- Real-time connections
- Delivery, ordering and idempotency
- Storage and data model
- Reliability and operations
Your diagram and your answers are both marked, against 5 areas: Requirements and estimates, Real-time connections, Delivery, ordering and idempotency, Storage and data model, Reliability and operations. Every answer gets what it got right and what it missed, with a strong answer to compare. The result comes by email and WhatsApp once it is marked.
Sample question
How do you find which server holds the open connection of the person a message is for, and what happens when that person has just switched from Wi-Fi to mobile data?
Take the Design a chat and messaging system test
What it covers
- websockets
- fan-out
- ordering
- presence
- push
Frequently asked questions
- How long is the Design a chat and messaging system test?
- 85 minutes at most: 45 minutes to design, then up to 10 questions.
- What will I be asked in the Design a chat and messaging system test?
- You design for 45 minutes on a canvas: components, connections and notes. Then you answer up to 10 questions: 5 about the scenario (what happens under load, when a part fails, as it grows) and 5 about the design you drew. Answer at least 3 to finish; each has about 4 minutes.
- How is the Design a chat and messaging system test marked?
- Your diagram and your answers are both marked, against 5 areas: Requirements and estimates, Real-time connections, Delivery, ordering and idempotency, Storage and data model, Reliability and operations. Every answer gets what it got right and what it missed, with a strong answer to compare. The result comes by email and WhatsApp once it is marked.
- Can I take the Design a chat and messaging system test on my phone?
- It is best on a laptop or desktop: the design canvas needs a wide screen. The readyforhires app opens it in your browser.
- Is the Design a chat and messaging system test free?
- It costs ₹15 a test, paid per test with no subscription. Prices in Indian rupees (INR).