Skip to main content

Live Comments (FB Live)

Difficulty: Medium

What It Tests

High-throughput real-time fan-out, comment ordering, scaling WebSocket connections.

Topics Covered

Hello Interview Breakdown

Read the full Hello Interview breakdown →

Video Walkthroughs

Approach Hints

  • Publish comments to Kafka (partitioned by stream_id)
  • WebSocket servers subscribe to stream partitions via Kafka consumer groups
  • Persist comments to Cassandra (partition by stream_id, cluster by timestamp)
  • Use consistent hashing to assign streams to WebSocket server groups; rate-limit comments per user to prevent spam