Real-Time Chat System
Preview mode. Log in to write architecture notes, save your answer, and get feedback.
Real-Time Chat System
Design a real-time chat application similar to WhatsApp or Facebook Messenger. Functional Requirements: - One-on-one messaging between users - Group chats (up to 500 members) - Online/offline status indicators - Message read receipts - Support for text, images, and file sharing Non-Functional Requirements: - Real-time message delivery (< 100ms for online users) - Messages should be persisted and never lost - Support for millions of concurrent users - End-to-end encryption for messages Scale: - 500M daily active users - Average user sends 40 messages per day - 20B messages per day
Examples
How would you implement end-to-end encryption?
Approach hint
Think about the connection protocol - HTTP is request-response, but chat is bidirectional. What protocol supports that?
Common mistake
Skipping assumptions, edge cases, or trade-offs can make an otherwise good answer feel incomplete.