Design Live Stream Chat for Channels With a Million Viewers
Last updated: November 29, 2026
Quick Overview
Design a chat system for a live streaming platform where a single popular channel can have a million concurrent viewers reading and sending messages in real time, with moderation tools.
Amazon
November 29, 20260
0
0 solved
Design a chat system for a live streaming platform where a single popular channel can have a million concurrent viewers reading and sending messages in real time, with moderation tools.
Twitch is an Amazon company, and live chat at this scale is a classic fan-out problem with very hot rooms. The interviewer checks whether you can handle extreme fan-out with a tiered edge layer, sampling or throttling of messages, and fast moderation actions.
What the Interviewer Expects
- Persistent connections at the edge
- Fan-out architecture for very large rooms
- Message rate limiting per user and per room
- Moderation: bans, deletes, slow mode applied quickly
- Message ordering good enough for chat
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you show chat history to someone who just joined?
- How would you implement emote-only or subscriber-only modes?
- How would you replay chat alongside a recorded video?
- What happens when a top streamer raids another channel and viewers move in seconds?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: viewers connect to a channel's chat, receive messages in near real time, send messages; moderators delete messages, time out or ban users, enable slow mode. Non-functional: a hot r...
High-Level Design
- Edge Connection Servers: hold WebSocket connections (perhaps 100k each); track which rooms each local connection is in.
- Ingest Service: receives sent messages, authenticates, applies rate ...