Design a Synchronized Live Comment Overlay
ByteDanceSoftware Engineer · Technical ScreenLast updated
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.
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?
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?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.