Best Way To Handle Live Football API Updates Without Constantly Polling?
I'm working on a football data integration and trying to figure out the cleanest way to handle live match updates. At the moment I'm testing the Sportmicro API for fixtures, scores, match events and statistics. The simple approach is requesting the live endpoint every few seconds, but with 30 live matches and a 5-10s poll the request volume explodes.
What approach do you use: poll one endpoint with all live matches, poll individual matches after detecting they're live, WebSockets if the provider supports them, cache match data locally and update only changed fields, different intervals for pre-game/live/finished?
How do you balance low latency with reasonable API usage on the backend of a production sports application? (Top reply: think in states - one global call every 10s, only update what changed, state drives poll speed, publish once to Redis and fan out via WebSocket: 21,000 calls/hour becomes ~200.)
Read more at nairaland.com