Practice: Design Messaging App System
WhatsApp-like messaging system with queues, storage, and notifications.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Users can send one-to-one and group text messages in real time.
- Users can send images, videos, and documents up to 100 MB.
- Messages must be delivered in order and exactly once per recipient.
- Users can see read receipts and delivery status (sent / delivered / read).
- Group chats support up to 1,000 members with fan-out delivery.
- Users receive push notifications when the app is in the background.
- Messages are end-to-end encrypted by default.
- Users can delete messages for themselves or for all participants within a time window.
- Offline users receive missed messages upon reconnection.
- Users can share their real-time location for a configurable duration.
Non-functional requirements
- Availability: 99.99% uptime; messages must not be lost even during partial outages.
- Latency: message delivery end-to-end under 200 ms at the 95th percentile for online users.
- Scalability: support 500 million daily active users and 100 billion messages per day.
- Durability: messages persisted for 30 days; media stored for 90 days.
- Throughput: ingest up to 1 million messages per second at peak.
- Consistency: eventual consistency acceptable for delivery status; strong consistency for message order within a thread.
- Security: end-to-end encryption; no server-side plaintext storage of message content.
- Resumability: failed media uploads can resume from the last committed chunk.
- Geo-distribution: data centres in each major region to comply with data residency laws.
- Observability: real-time lag metrics per queue, alerting within 60 seconds of anomaly.