System Design Masterclass
Social Mediareal-timestreamingwebsocketsaggregationfan-outintermediate

Design Live Reactions System

Design Facebook-style live likes and reactions for streaming content

Millions of reactions/sec|Similar to Facebook, Instagram, TikTok, YouTube, Twitch|45 min read

Summary

A live reactions system displays real-time emoji reactions (likes, hearts, laughs) floating across a live video stream. The core challenges are handling millions of reactions per second during viral moments, aggregating counts efficiently, broadcasting to millions of concurrent viewers with minimal latency, and preventing the system from overwhelming clients. This is asked at Facebook, TikTok, YouTube, and any live streaming company.

Key Takeaways

Core Problem

This is a write-heavy fan-out problem. Millions of users write reactions, and those reactions must be broadcast to millions of viewers in real-time.

The Hard Part

A viral live stream can receive 100K reactions per second. You cannot send each reaction individually to 10M viewers - that is 1 trillion messages per second.

Scaling Axis

Scale by stream ID. Each stream is independent. Within a stream, aggregate reactions into time windows before broadcasting.

The Question: Design a system that shows real-time emoji reactions floating across a live video stream, like Facebook Live or Instagram Live.

The system must handle: - Reaction ingestion: Users tap to send reactions (like, love, wow, haha, sad, angry) - Real-time display: Reactions float up the screen as animations - Aggregated counts: Show total counts per reaction type - Massive scale: Viral streams with millions of concurrent viewers

What to say first

Before I design, I want to clarify the scale and latency requirements. The interesting part of this problem is handling viral moments where reaction rate spikes 100x normal.

What interviewers are testing: - Can you handle extreme write throughput? - Do you understand fan-out challenges at scale? - Can you make pragmatic tradeoffs (sampling, batching)? - Do you think about client-side constraints?

Premium Content

Sign in to access this content or upgrade for full access.