Design labs · 5 questions
Design a Real-time Chat System
"Design a real-time messaging system like WhatsApp or Slack supporting 50 million daily active users, 1-on-1 and group chats, online presence status, and sub-100ms message delivery with offline sync."
Real-time chat systems differ fundamentally from typical request-response web apps. They require persistent bidirectional stateful connections (WebSockets), efficient user-to-connection routing across distributed servers, strict message ordering, and high-throughput append-only message persistence.
Work through the connection management, cross-server message fanout, message ordering, and offline delivery.
Step 1 of 5
Requirements gatheringWhich requirements define the core real-time chat architecture?
This scenario leans on Message Queues, Scaling Basics and Consistency and CAP. Reading one first is a recommendation, never a requirement — and doing the lab cold then reading is a perfectly good order.