Design a Synchronized Live Comment Overlay
Company: Bytedance
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
# Design a Synchronized Live Comment Overlay
Design a chat-like comment service whose messages appear as a live overlay synchronized to a video or event timeline. Viewers can publish short comments at their current playback position and receive relevant comments while watching live or replaying later.
Cover publish and read APIs, message ordering, real-time delivery, storage, timeline queries, fanout, moderation, rate limits, and client synchronization. State what ordering and latency guarantees are realistic when viewers and servers have different clocks.
### Constraints & Assumptions
- A popular event may have a very large concurrent audience and bursty comment traffic.
- Clients may pause, seek, reconnect, or watch at different playback positions.
- The overlay should remain usable under heavy load rather than rendering every accepted comment.
- Comments require moderation and abuse controls.
### Clarifying Questions to Ask
- Is the canonical timeline live wall-clock time, media position, or both?
- Must every viewer see the same comments in the same order?
- What latency, retention, replay, and regional requirements apply?
- Are likes, replies, filtering preferences, or creator moderation in scope?
### What a Strong Answer Covers
- A canonical event-relative timestamp and server-assigned stable ordering key
- Durable append path plus scalable real-time fanout
- Time-bucketed storage and range queries for replay or seeking
- Sampling, ranking, backpressure, moderation, and per-user filtering
- Reconnect cursors, deduplication, observability, and graceful degradation
### Follow-up Questions
- How would you prevent a burst from obscuring the video?
- How does a late moderation decision remove a comment from connected clients?
- How would you support a global replay after the live event ends?
- Which data can be processed regionally and which needs global coordination?
Quick Answer: Design a live comment overlay that stays synchronized with a video during live viewing, replay, seeking, and reconnects. Explore timeline semantics, stable ordering, scalable fanout, replay queries, moderation, backpressure, and graceful degradation during traffic bursts.