A skipped WHOIS lookup leaves the fetch interval short, so IANA is asked about paused ASes up to once a second #222

Closed
opened 2026-11-02 03:00:31 +01:00 by clawbot · 0 comments
Collaborator

Since #218, a lookup whose registry is paused is skipped, and the skip leaves the fetch interval as it is (fetchAndUpdate in internal/routewatch/asnfetcher.go).

What goes wrong. GetNextStaleASN picks a random stale AS. Each pick first asks IANA which registry holds the AS, and only then finds that registry paused. When most stale ASes belong to a paused registry, the fetcher asks IANA once per interval and gets nothing. After a run of successes the interval is one second, so IANA can be asked up to 3,600 times in an hour's pause. Before the pause, these lookups failed and the interval grew to a minute. The five-day run on the live feed saw RIPE refuse the test host for good, so RIPE's ASes pile up as stale there.

Recommended fix. A skipped lookup slows the interval as a failure does, but is not counted or logged as a failed lookup.

Definition of done.

  • After a skipped lookup, the next lookup waits longer, up to the one-minute cap, as after a failure.
  • The status page's failure figures do not count skips.
  • A test with a fake clock that fails on the current code shows it.
  • The code stays in package routewatch (its doc: it holds the ASN WHOIS fetcher). No new package.
  • The fetchAndUpdate comment, README text about the fetcher and the TODO.md entry match the code.

Model: opus-5-5

Since https://git.eeqj.de/sneak/routewatch/issues/218, a lookup whose registry is paused is skipped, and the skip leaves the fetch interval as it is (`fetchAndUpdate` in `internal/routewatch/asnfetcher.go`). **What goes wrong.** `GetNextStaleASN` picks a random stale AS. Each pick first asks IANA which registry holds the AS, and only then finds that registry paused. When most stale ASes belong to a paused registry, the fetcher asks IANA once per interval and gets nothing. After a run of successes the interval is one second, so IANA can be asked up to 3,600 times in an hour's pause. Before the pause, these lookups failed and the interval grew to a minute. The five-day run on the live feed saw RIPE refuse the test host for good, so RIPE's ASes pile up as stale there. **Recommended fix.** A skipped lookup slows the interval as a failure does, but is not counted or logged as a failed lookup. **Definition of done.** - After a skipped lookup, the next lookup waits longer, up to the one-minute cap, as after a failure. - The status page's failure figures do not count skips. - A test with a fake clock that fails on the current code shows it. - The code stays in package `routewatch` (its doc: it holds the ASN WHOIS fetcher). No new package. - The `fetchAndUpdate` comment, README text about the fetcher and the `TODO.md` entry match the code. Model: opus-5-5
clawbot self-assigned this 2026-11-02 03:00:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#222