Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Chat System Design

Visual Problem Diagram

Chat System Design architecture diagram

Scenario

You send "on my way" in a group chat during a launch, expecting it to appear once, and in order, for friends who have the chat open. The painful failure is when the same text shows up twice, because a network retry saved the send again instead of recognizing it as the same message.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

A person sends a text to one friend or to a group. They can attach a photo or a file. They see when the message was delivered and when it was read. They see who is online. If they were offline, they catch up when they reconnect. They can scroll back through older messages.

You need to explain how a message reaches someone whose app is open. You need to explain how messages in one chat stay in order when a send is retried. You need to explain how a large group receives a message without a separate copy for every member. You need to explain how someone who was offline catches up without seeing the same message twice. Typing indicators can stay thin.

Constraints

Functional

People can talk one to one and in a group. They can send text, images, and files. They can see delivered and read. They can see who is online. They can scroll older messages.

Non-functional

Most messages to someone who is online arrive in under 200 milliseconds. The service stays up about 99.99% of the time. Messages in one chat stay in order. History is kept.

Scale

About 500 million users and 50 million people using it in a day. About 2.5 billion messages a day, peaking around 30,000 messages a second. That send rate is the heavy write. About 1.25 terabytes of new messages a day. Millions of people stay connected at once. A launch can keep about 5 million connections open.

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing