Live Sports Scoreboard
Real-time scores for millions of fans
Design a service that takes live match data from sports data feeds and gets every score change onto millions of screens within a couple of seconds, in order, including corrections.
Overview
A live scoreboard shows the current score, clock and latest plays of games in progress, and updates them while the fan watches. The data comes from a licensed sports data feed; the product's job is to get each change to every open screen quickly and correctly.
The input is tiny and the output is huge. A game produces an event every few seconds; a big game may have ten million people watching the scoreboard. So the design is a fan-out problem: apply each event once, then copy it outward through a tree until the last hop writes it to millions of sockets. Two other things make it interesting. Fans all arrive at once, at kickoff and at the moment of a goal. And scores are not only additive: a goal can be disallowed on video review, and a data provider can correct an earlier play, so the system must handle a score that goes down without screens showing numbers in the wrong order.
Questions to ask first
- How many viewers? — 50 million at peak across all games; 10 million on the biggest game
- How fresh? — A change on screen within 2 seconds of reaching us, at p99
- Where does data come from? — A primary licensed feed per sport, plus a backup feed
- Which clients? — Mobile apps and web pages, often in the background
- Push notifications? — Yes, for goals and final scores, to fans who follow a team
- Corrections? — Yes: plays can be changed or removed after the fact
What you will be able to do
- Keep one ordered, versioned state per game, with corrections.
- Size a fan-out tree for ten million viewers of one game.
- Choose between WebSocket, SSE and CDN-cached polling, with numbers.
- Survive the kickoff surge with snapshots, admission control and jittered reconnects.
- Send goal notifications that do not pile up on a phone that was offline.
Key concepts
- Data feeds
- Single writer per game
- Versioned game state
- Snapshot plus deltas
- Fan-out tree
- WebSocket or SSE
- CDN-cached polling
- Collapsible push notifications
- Kickoff surge
- Corrections
Functional requirements
- Ingest events from the primary and backup data feeds and merge them
- Keep one authoritative, versioned state per game (score, clock, period, plays)
- Push each change to every open scoreboard for that game
- Serve a current snapshot of any game and a scoreboard of all games
- Apply corrections, including a score going down
- Send push notifications for goals and final scores to followers
Non-functional requirements
- A change reaches open screens within 2 seconds of arriving from the feed, at p99 (a target we chose)
- Every screen shows versions in order and never goes back to an older one
- A kickoff surge of millions of joins does not slow updates for people already watching
- Losing a gateway or a region only makes its clients reconnect; scores stay correct
- If the primary feed stops, the backup takes over within seconds
Interview questions
- How do you get one goal onto ten million screens within two seconds?
- How do you keep updates in order, including corrections?
- Would you use WebSockets, SSE or polling?
- What happens at kickoff when five million fans open the game?
- Two data feeds report different scores. What do you show?
- How do you send goal notifications without spamming offline phones?
Sign up free to read the full topic
More System Design topics
Start free on Cariara · Coding problems · System design studio