From bb09bcfae736b5e5315a1157e88b8a444cfe5ac3 Mon Sep 17 00:00:00 2001 From: jing Date: Mon, 13 Jul 2026 23:51:57 +1000 Subject: [PATCH] =?UTF-8?q?harden=20ADSBx=20quota=20guard:=205-min=20?= =?UTF-8?q?=E2=86=92=2010-min=20single-flight=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The $10 ADSBx BASIC tier has NO hard limit and bills $0.0015/request over 10k/month, so the cache TTL must guarantee we stay under. Widened the cache window 5→10 min: since proxy_cache_lock coalesces all requests into ONE upstream call per window, this caps upstream at ~144 calls/day (~4.4k/month, --- js/config.js | 11 +++++++---- serve.py | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/js/config.js b/js/config.js index 2904679..5121bbf 100644 --- a/js/config.js +++ b/js/config.js @@ -89,12 +89,15 @@ export const CONFIG = { }, // Military aircraft — ADS-B Exchange /v2/mil/ (REAL unfiltered military, the - // OSINT prize OpenSky hides). Paid RapidAPI feed; the same-origin proxy injects - // the key server-side AND 5-min-caches it, so poll cadence == cache TTL keeps - // the ~10k/month quota safe (~8.6k/month worst case). + // OSINT prize OpenSky hides). Paid RapidAPI feed with OVERAGE billing over + // 10k/month (no hard block), so the same-origin proxy injects the key + // server-side AND single-flight-caches /v2/mil/ for 10 min: the *cache TTL* + // (not this poll) governs the upstream quota → max ~144 calls/day (~4.4k/mo, + //