trails/docs/ideas/self-host-overpass/specs/rate-limiting/spec.md
Ullrich Schäfer c4874dc04c
Park self-host-overpass spec under docs/ideas
The interim proxy (#239/#240/#242/#243) covers the day-one needs for
Overpass — User-Agent compliance via server-side proxy, same-origin +
rate limit + cache with coalescing, bbox quantization, observability.
Further work on self-hosting the upstream is no longer urgent.

Move the full OpenSpec artifact set out of openspec/changes/ so it
doesn't clutter the active change list, and park it under
docs/ideas/self-host-overpass/ as a reference for when we revive it.
Adds a short README at the new location capturing:
- current interim solution
- triggers that would justify reviving (rate limits, >1 req/s, etc.)
- key decisions already made (Hetzner-to-Hetzner firewall model,
  DOCKER-USER chain, capacity ceiling at DACH on current box)
- how to switch when the time comes (flip OVERPASS_URL, no client
  changes)

The files were never committed in the first place (WIP in the working
tree through the proposal session), so no git history to preserve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 07:40:44 +02:00

696 B

ADDED Requirements

Requirement: Overpass proxy rate limit

The Planner SHALL limit Overpass queries on the /api/overpass proxy route to 20 per session per minute, with a burst allowance of 5.

Scenario: Overpass rate limit exceeded

  • WHEN a session sends more than 20 Overpass queries within 60 seconds (beyond the burst allowance)
  • THEN the server responds with 429 and the request is NOT forwarded to the upstream Overpass service

Scenario: Normal browsing within limit

  • WHEN a session pans and zooms the map at a realistic pace (well under 20 queries/minute)
  • THEN all queries are forwarded to the upstream Overpass service without rate-limit rejections