Hard
DiscordMetaSlack
Design a Chat Application System Design Interview
Design a real-time chat application like WhatsApp or Facebook Messenger.
1. Problem Statement
We're going to design a real-time chat application similar to WhatsApp. What are the key features and constraints we should consider?
2. Target Architecture (Mermaid)
The high-level architecture required to scale this system involves decoupling stateful components and utilizing specialized databases. Below is the reference architecture:
Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph TD
A[Alice] -->|WebSocket| B(Chat Server 1)
C[Bob] -->|WebSocket| D(Chat Server 2)
B --> E[Pub/Sub / Redis]
E --> D
B --> F[(Cassandra : Messages Table)]3. Key Focus Areas
- 1Protocol Choice (WebSockets vs Long Polling)
- 2Message Storage & History (HBase/Cassandra vs SQL)
- 3Real-time Status/Presence (Heartbeats)
- 4Push Notifications (Mobile wake-up)
- 5Group Chat Fan-out efficiency
Want interactive feedback?
Reading architectures is not enough. Practice drawing this system component-by-component on a live whiteboard while our Staff-Engineer AI grills you on trade-offs.
Start InterviewCore Concepts
System DesignReal-time CommunicationDatabases
