Resilient Sports Statistics Aggregation
Design a sports-statistics service that remains useful and honest when upstream providers are slow, rate-limited, unavailable, or respond successfully with bad data.
Problem statement
For this exercise, assume a web service combines feeds from six third-party sports-data providers and serves live scores plus historical player and team statistics. Providers differ in coverage, identifiers, update frequency, quotas, reliability and data quality.
For this exercise, assume at least three independently operated providers supply overlapping observations for selected events; a provider can return an incorrect value even while its HTTP requests succeed.
Design a backend that continues serving useful results through an upstream outage without presenting stale or conflicting data as current. Every response must expose its freshness, a delayed provider must not exhaust shared capacity, and recovery must reconcile late or corrected events.
Explain how suspect contributions are identified or excluded without claiming that agreement proves correctness. An unresolved disagreement must remain visible rather than silently producing a false current statistic. User accounts, betting, and video are out of scope.
What to build
- The service ingests provider updates through polling or callbacks while enforcing each provider's quota and normalizing identifiers.
- Clients can read live-event and historical statistics with explicit source, version, and freshness metadata.
- During provider failures the service serves a labeled last-known result or an explicit unavailable outcome, then reconciles delayed and corrected updates after recovery.
- The service detects or exposes disagreements among overlapping observations, retains their provenance, excludes or quarantines suspect contributions under an explicit policy, and can report an uncertain or unavailable statistic.
At scale
- Assume about 1 million daily users and a peak of 50,000 read requests per second during major events.
- For this exercise, assume six independently operated providers with independent quotas, outages up to 30 minutes, and overlapping observations from at least three providers for selected events; their underlying data may still have correlated errors.
- Target p95 read latency below 300 ms; live-score data should normally be no more than 10 seconds old, while historical data may be cached for hours.
- Retain normalized event history and correction provenance for one year so delayed updates can be reconciled and audited.