System Design Problem

Design Live Likes & Reactions

Commonly Asked By:MetaByteDanceTwitterLinkedIn

  • React to content: Allow users to emit live reactions (❤️ 😂 😮 😢 😡) to posts, videos, or active live streams.
  • Real-time count: Display reaction counts that update instantly for all active viewers.
  • Reaction animations: Render floating reaction emojis on live streaming screens in real-time.
  • Toggle reactions: Allow users to change or withdraw their reaction instantly.
  • Aggregate totals: Show the cumulative total counts grouped per reaction type (e.g., 1.2K ❤️, 300 😂).
  • Deduplication: Restrict every user to exactly one reaction per content item.

Reactions are submitted via a fast POST path to stateless Reaction Services which validate and record events in memory. Simultaneously, events stream into a Kafka partition pipeline. Reaction Aggregators batch and publish updates to Redis Pub/Subevery 500ms. Stateful WebSocket Gateways receive updates and broadcast batched delta animations to all viewers.

Loading...