Practice/Meta/Design Meta Live Comments
Design Meta Live Comments
Product DesignMust
Problem Statement
Design a real-time score tracking and update system for live sporting events similar to ESPN, The Athletic, or theScore. The system needs to push score updates, play-by-play commentary, and game statistics to millions of concurrent viewers watching dozens of simultaneous games. Users expect instant notifications when their favorite teams score, real-time standings updates, and the ability to follow multiple games at once without experiencing lag or stale data.
Your design should handle major sporting events like March Madness (68 games in the first round) or NFL Sunday (16+ concurrent games), where tens of millions of users are actively following games. Consider how to efficiently broadcast updates to interested users, manage connection failures during critical moments, and ensure fair resource allocation so one extremely popular game doesn't starve updates for less-watched games.
Key Requirements
Functional
- Live score updates -- push score changes, quarter/period transitions, and game status to all followers within 1-2 seconds
- Personalized feeds -- allow users to subscribe to specific teams, leagues, or games and receive filtered updates
- Historical playback -- support viewing past plays and score progression for in-progress and completed games
- Multi-game tracking -- enable users to follow 5-10 games simultaneously with independent update streams
- Rich event data -- deliver player statistics, shot charts, and contextual game information beyond just scores
Non-Functional
- Scalability -- support 50M concurrent connections during peak events with 100+ simultaneous games
- Reliability -- guarantee 99.9% delivery of critical score events, handle graceful degradation under load
- Latency -- deliver score updates to clients within 2 seconds of official scorer input, p99 under 5 seconds
- Consistency -- ensure all clients see score updates in correct chronological order, handle out-of-order messages
What Interviewers Focus On
Based on real interview experiences, these are the areas interviewers probe most deeply:
1. Connection Management and Protocol Selection
Interviewers want to understand how you'll maintain persistent connections to millions of clients efficiently and which protocol best suits real-time bidirectional communication needs.
Hints to consider:
- WebSocket provides full-duplex communication but requires connection state; compare with Server-Sent Events for unidirectional push
- Connection pooling strategies across multiple edge servers to distribute load
- Heartbeat mechanisms to detect dead connections and clean up resources
- Mobile-specific considerations like handling backgrounding, cellular vs WiFi transitions
2. Fan-Out Architecture for Update Distribution
The core challenge is broadcasting each score update to potentially millions of interested users without overwhelming your infrastructure or creating hotspots.
Hints to consider:
- Topic-based pub-sub systems where users subscribe to team/game channels
- Multi-tier fan-out: broadcast servers push to regional aggregators, which fan out to edge servers
- Caching frequently-accessed game states at CDN edges to reduce backend load
- Rate limiting and batching strategies when a single popular game has 10M+ followers
3. Handling Network Partitions and Reconnections
Mobile users frequently lose connectivity during critical game moments. The system must handle graceful reconnection and catch-up without overwhelming servers.
Hints to consider:
- Sequence numbers or vector clocks to identify missed messages during disconnection
- Short-term message buffering to support replay of recent events on reconnect
- Exponential backoff for reconnection attempts during mass disconnection events
- Delta compression to efficiently transmit catch-up state for games that progressed significantly
4. Data Ingestion and Source of Truth
Score data originates from official scorers, feeds must be validated, deduplicated, and rapidly distributed while maintaining correctness.
Hints to consider:
- Primary and backup data feeds from official scoring systems, handling conflicts and delays
- Event sourcing pattern to maintain complete play-by-play history and support recomputation
- Write-ahead log for durability before fan-out, enabling replay if downstream systems fail
- Validation rules to catch obviously incorrect scores (negative points, impossible time stamps)
Suggested Approach
Step 1: Clarify Requirements
Start by confirming the scope and constraints with your interviewer:
- Scale parameters: How many concurrent games during peak? What's the largest single-game audience? Average number of score updates per game per minute?
- Update types: Just scores, or also possession changes, player stats, video highlights, user reactions?
- Latency tolerance: Is 2-second delay acceptable, or do you need sub-second for betting applications?
- Client capabilities: Web browsers, mobile apps, smart TVs? How do connection characteristics differ?
- Subscription model: Can users follow unlimited games, or is there a cap? How granular are subscriptions (team, league, player)?