Files
gods-eye-view/changelog.d/685-opensky-track-credit-governor.md
T
daikaginza bfcf12af49 fix(server): give /tracks its own credit cooldown, armed by its own 429
The branch read the /states/all cooldown from /api/flights and never set
one from /tracks/all, which is backwards for an API that meters the two
separately: a flights cooldown blocked backfill that still had credits,
and a /tracks 429 left every other icao24 free to ask again.

tracks.js now keeps a cooldown for the /tracks bucket, armed by a 429
from /tracks/all with OpenSky's retry-after (opensky.js exports its
existing parser so both buckets read the header the same way). The two
routes get separate limiters, and a limiter refusal sends Retry-After 60,
the window, rather than 10.
2026-10-23 12:34:46 +07:00

755 B

  • Stop the track-backfill proxies from turning a varied icao24/hex into unbounded upstream spend. /api/flights/track and /api/military/track each carry an always-on 30-per-minute per-client limiter (90 global), and a 429 from OpenSky /tracks/all now starts a cooldown for that credit bucket: until OpenSky's retry-after passes, any cached track is served and other lookups are answered 429 locally instead of asking for 4 more credits. The /tracks/* bucket is separate from the /states/* one /api/flights spends, so a flights cooldown does not block backfill. The existing 60-second per-key cache bounds memory, not spend. Single-aircraft backfill, issued once per selected contact, is unaffected (daikaginza, #685).