Skip to content

fix(wingbits): add 5-minute backoff on /v1/flights failures#459

Merged
koala73 merged 1 commit intomainfrom
fix/wingbits-backoff
Feb 27, 2026
Merged

fix(wingbits): add 5-minute backoff on /v1/flights failures#459
koala73 merged 1 commit intomainfrom
fix/wingbits-backoff

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Feb 27, 2026

Summary

  • Add 5-minute backoff when Wingbits POST /v1/flights returns non-ok (429, 500, etc.) or network error
  • Prevents retry-on-every-poll (~3 req/min) when OpenSky is down and Wingbits is rate-limiting
  • Falls through to stale/backup cache during backoff (24h/7d TTL)
  • Success resets the backoff timer

Context

Wingbits dashboard showed sustained POST 429s during an OpenSky outage. Root cause: failed responses weren't cached by cachedFetchJson, so every frontend poll triggered a fresh upstream attempt.

Test plan

  • npx tsc --noEmit — passes
  • Vite production build — passes
  • When Wingbits returns 429/500, subsequent calls are skipped for 5 minutes
  • When Wingbits succeeds after backoff, timer resets and normal operation resumes
  • Stale/backup cache serves theater posture data during backoff period

When OpenSky is down, every theater posture poll falls through to
Wingbits POST /v1/flights. Failed responses (429, 500, etc.) were not
cached, causing retry-on-every-poll (~3 req/min) and sustained 429s.

Add module-level backoff: any non-ok response or network error skips
Wingbits calls for 5 minutes, falling through to stale/backup cache.
Success resets the timer. Reduces Wingbits API load ~15x during
OpenSky outages.
@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Feb 27, 2026 11:02am
worldmonitor-finance Building Building Preview, Comment Feb 27, 2026 11:02am
worldmonitor-happy Building Building Preview, Comment Feb 27, 2026 11:02am
worldmonitor-startup Building Building Preview, Comment Feb 27, 2026 11:02am

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73 koala73 merged commit 03479c3 into main Feb 27, 2026
4 of 6 checks passed
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
…oala73#459)

When OpenSky is down, every theater posture poll falls through to
Wingbits POST /v1/flights. Failed responses (429, 500, etc.) were not
cached, causing retry-on-every-poll (~3 req/min) and sustained 429s.

Add module-level backoff: any non-ok response or network error skips
Wingbits calls for 5 minutes, falling through to stale/backup cache.
Success resets the timer. Reduces Wingbits API load ~15x during
OpenSky outages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant