Back to Interview Gym

Real-time Chat System

MediumDesign60 minutes

Problem Statement

Build a real-time messaging system supporting 1:1 and group chats with presence indicators, delivery guarantees, and offline notifications. Handle millions of users.

Key Expectations

  • WebSocket connections for real-time messaging
  • Message delivery guarantees and ordering
  • Presence and online status management
  • Push notifications for offline users
  • Group chat scaling and permissions

Key Components to Consider

WebSocket GatewayMessage QueueChat ServiceUser ServiceNotification ServiceDatabase

Ready to Start?

Once you start, the timer will begin. You can use the whiteboard to design your solution and take notes in the sidebar.

Session Notes

Notes are automatically saved as you type

💡 Interview Tips

1. Clarify Requirements (5 min)
Ask about scale, features, and constraints
2. Capacity Planning (5 min)
Estimate users, data, and throughput
3. High-Level Design (15 min)
Core components and data flow
4. Deep Dive (15 min)
Critical components and APIs
5. Scale & Optimize (5 min)
Bottlenecks and solutions