System Design Mastery

Design. Whiteboard. Excel.

Practice system design with a real-time AI interviewer who watches your whiteboard, asks deep-dive questions, and gives structured feedback.

4 Easy4 Medium4 Hard
12 problems
HLDEasy

Design URL Shortener

Design a URL shortening service like TinyURL or bit.ly.

DatabaseScalability
25-35 min
Start Design
HLDEasy

Design Pastebin

Design a text storage service like Pastebin where users can store and share text segments.

Database
25-35 min
Start Design
HLDEasy

Design a Hit Counter

Design a Hit Counter that counts the number of hits in the past 5 minutes.

Data Structures
25-35 min
Start Design
HLDEasy

Design a Live Leaderboard

Design a real-time leaderboard for a massive online game.

GamingReal-time
25-35 min
Start Design
HLDMedium

Design Key-Value Store

Design a distributed Key-Value store like Redis or DynamoDB.

Distributed Systems
35-45 min
Start Design
HLDMedium

Design Consistent Hashing

Design a system to distribute requests uniformly across a dynamic set of servers.

Load Balancing
35-45 min
Start Design
HLDMedium

Design Notification System

Design a scalable notification system to send millions of notifications (Email, SMS, Push).

Distributed Systems
35-45 min
Start Design
HLDMedium

Design a Real-time Team Messaging Platform (ChatterBox)

# ChatterBox: Real-time Team Messaging Platform ## Problem Statement Design a scalable, real-time team messaging platform similar to Slack, called ChatterBox. Users should be able to create teams, join channels within those teams, send direct messages to other users, share files, and search through message history. The system needs to handle a large number of concurrent users and messages with low latency. ## Core Requirements (Functional) * **User Management:** User registration, login, profile management. * **Team Creation & Management:** Users can create teams and add/remove members. * **Channel Creation & Management:** Within a team, users can create public and private channels. * **Messaging:** * Sending and receiving text messages in channels and direct messages. * Real-time message delivery. * Message editing and deletion (with appropriate permissions). * Message threading (replies to messages). * **File Sharing:** Users can upload and download files within channels and direct messages. * **Search:** Users can search for messages based on keywords, users, and channels. * **Presence:** Indicate user online/offline status. * **Notifications:** Desktop and mobile push notifications for new messages and mentions. ## Non-Functional Requirements * **Scale:** The system should be able to handle a large number of concurrent users and messages. * **Latency:** Message delivery should be near real-time (target: < 200ms for 95th percentile). * **Availability:** The system should be highly available (target: 99.9% uptime). * **Reliability:** Messages should be reliably delivered, even in the face of network failures. * **Security:** Messages should be encrypted in transit and at rest. Access control should be enforced. ## Key Features to Design 1. **Message Routing & Delivery:** How will messages be routed from sender to recipients in real-time? 2. **Data Storage:** What database(s) will be used to store messages, users, teams, and channels? Consider the trade-offs between relational and NoSQL databases. 3. **Real-time Communication:** How will real-time communication be implemented (e.g., WebSockets, Server-Sent Events)? 4. **Search Indexing:** How will messages be indexed for efficient search? 5. **File Storage:** How will files be stored and served? 6. **Scalability & Fault Tolerance:** How will the system be scaled to handle increasing load and ensure high availability? ## Expected Traffic/Scale Numbers * **Daily Active Users (DAU):** 10 million * **Monthly Active Users (MAU):** 50 million * **Average Messages per User per Day:** 50 * **Peak Concurrent Users:** 2 million * **Average Message Size:** 1KB * **Average File Size:** 5MB * **Read/Write Ratio:** 8:2 (Reads are more frequent than writes) * **Retention Policy:** Store message history for at least 1 year. * **Number of Teams:** 500,000 * **Average Channels per Team:** 20

ScalabilityReal-timeDatabaseWebSocketsCachingMessage QueueSearchPrivateBYOP
35-45 min
Start Design
HLDHard

Design Twitter / X

Design a scalable social media platform like Twitter (now X).

SocialScalability
45-60 min
Start Design
HLDHard

Design WhatsApp

Design a real-time messaging application like WhatsApp.

ChatReal-time
45-60 min
Start Design
HLDHard

Design Uber Backend

Design the backend for a ride-sharing service like Uber/Lyft.

Geo-SpatialReal-time
45-60 min
Start Design
HLDHard

Design Instagram News Feed

Design a photo-sharing news feed like Instagram.

Social
45-60 min
Start Design
More coming soon

New system design problems are added regularly.