Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Heuristic:7onez Cti expert Wayback Circuit Breaker

From Leeroopedia
Knowledge Sources
Domains OSINT, Rate_Limiting, Debugging
Last Updated 2026-10-28 14:00 GMT

Overview

A run-scoped circuit breaker on Wayback/archive.org calls trips after 20 consecutive failures, with per-IP pacing (4s between playback fetches) and exponential cooldown (60s→3600s) to avoid extending firewall blocks.

Description

The Wayback Machine will firewall an IP that requests too aggressively. Measured on 2026-09-28: ~17 playback fetches in ~40s from one IP made web.archive.org refuse every TCP connection from that IP for ~8 minutes. The circuit breaker (`wayback_guard.py` / `wayback_guard.json`) prevents this with three mechanisms:

  • Fail limit (20): After 20 consecutive Wayback failures (network error, timeout, 429, 5xx — never a valid "no capture" answer) within one run, the breaker trips. Every further Wayback call site returns its normal tri-state skip without making a request. A valid "no capture" answer never counts as a failure.
  • Pacing: Minimum seconds between requests to one archive host from one exit. Index calls (CDX/Timemap): 1.5s. Playback calls (snapshot fetches, id_ redirect resolver, Save Page Now): 4s. Separate exits (direct, each proxy, WARP, Tor) get separate slots, so N exits run N× in parallel.
  • Cooldown: After HTTP 429 (throttled: 60s) or refused TCP connection (refused: 300s), every call site returns its skip without touching the network. Cooldown doubles for each repeat offence within 15 minutes, never above 3600s — the archive doubles its own block the same way, and retrying into a firewall block is what extends it.

The breaker is keyed on `$INTEL_RUN_ID` (one breaker per run). Without a run ID, it keys on a coarse time window (1800s) so ad-hoc sessions still recover.

Usage

Use this heuristic when:

  • Wayback calls failing in a run: Check the circuit breaker — if 20 consecutive failures tripped it, all subsequent Wayback calls are skipped (not failed). The run continues with other data sources.
  • Tuning pace: Set `WAYBACK_MIN_INTERVAL` to override every lane, or 0 to disable pacing. Use multiple egress exits (proxies, WARP, Tor) to run N× in parallel — each exit gets its own pace slot.
  • Recovering from a block: Wait for the cooldown to expire. Do NOT retry into a firewall block — that extends it. The archive doubles its block on repeat offences.
  • Archive User-Agent: archive.org's bot filter flags a browser UA sent by a non-browser client. The breaker sends an honest client UA (`cti-expert/1.0`) to archive.org hosts only — an exception to the project's Android-UA rule (which still governs every target-facing request).

The Insight (Rule of Thumb)

  • Action: Respect the circuit breaker; do not disable it under load. Use multiple exits for parallelism, not faster pacing on one exit.
  • Value: `fail_limit=20`, `pace.playback=4s`, `cooldown.throttled=60s`, `cooldown.refused=300s`, `cooldown.max=3600s`.
  • Trade-off: Pacing slows collection but prevents multi-minute IP bans. Disabling it "just this once" is how you get an 8-minute block.
  • Never count "no capture" as a failure: A valid answer that there is no capture is success, not failure. Only network errors, timeouts, 429s and 5xx count.

Reasoning

The Wayback Machine is a free public service with per-IP rate limits. Aggressive fetching triggers a firewall block that lasts minutes and doubles on repeat offences. The circuit breaker converts this into a graceful degradation: after 20 failures, the run stops hitting Wayback and continues with other data sources (live fetch, CT, passive DNS). The pacing prevents triggering the block in the first place — 4s between playback fetches per exit is empirically safe. The honest User-Agent matters: measured on 2026-10-13, a spoofed Chrome UA drew HTTP 429 on 2 of 4 snapshot fetches while an honest client UA drew none. archive.org is a third party, not the target, so an honest UA exposes nothing to the operator.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment