pdb-cache

Drop-in caching API for PeeringDB — a local mirror with no rate limits.

STABLE Infrastructure & Ops · 8 features · Python · Django 5.2 · Flask · SQLite / PostgreSQL

overview

pdb-cache keeps a local mirror of PeeringDB and serves a drop-in replacement query API — point your automation at it instead of peeringdb.com/api and you skip the latency and the rate limits entirely.

Maintained fork of natesales/peeringdb-cache with fixes for upstream issues: silent sync failures, database locks, missing ixlan fields and restart support.

features

  • ▸Drop-in API — swap the base URL and existing PeeringDB clients just work
  • ▸13 resource types — org, fac, net, ix, campus, carrier, ixfac, ixlan, ixpfx, netfac, netixlan, poc…
  • ▸Bulk-snapshot first sync, then incremental — only changes are pulled after that
  • ▸Change probes — tiny ?since= checks every 10 min trigger a sync when PeeringDB moves
  • ▸SQLite, PostgreSQL or CockroachDB backends
  • ▸/healthz + /readyz — liveness/readiness with sync stats for orchestrators
  • ▸Prometheus /metrics — sync timing, failures, per-resource counts
  • ▸Docker / docker-compose, restart policies, optional API key for private poc/ixlan data

documentation 1 pages

open full docs →

stack

Python Django 5.2 Flask SQLite / PostgreSQL Docker Prometheus

get started

quickstart
$ docker compose up -d --build
$ curl http://localhost:8080/api/org
$ curl http://localhost:8080/metrics
▊