architect e3ee12262a Speed up cache misses with a rollup table, CGO SQLite, and warming
- Swap modernc.org/sqlite for mattn/go-sqlite3 so aggregation runs
  in native C instead of a transpiled Go VM; Containerfile now builds
  with CGO and musl-dev.
- Add a daily_peer_stats rollup (one row per peer per day) so /stats,
  /, and /api/countries aggregate over ~peers*days rows instead of
  the full 7-day checks window. RecordChecks upserts into it in the
  same tx; PruneOldChecks trims both tables; first boot backfills
  from existing checks.
- Move per-connection pragmas into the DSN and bump cache_size to
  ~40 MB so hot pages stay resident; ANALYZE once after migrate.
- Add Store.RefreshCaches, called from the checker after each run,
  so the expensive queries always execute on checker time and user
  requests hit a warm cache.
2026-04-19 14:54:45 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00
2026-04-11 00:29:52 +02:00

yggpeers

A webapp that tracks the reachability of public peers for the Yggdrasil network. Supports JSON and CSV output, a peer world map, statistics, and more.

Deploying

docker run -p 8080:8080 foundry.fsky.io/fsky/yggpeers:latest

A Quadlet unit file is available at contrib/quadlet/yggpeers.container for deploying with Podman and systemd.

From source

Requires Go 1.26+ and Git.

go build -o yggpeers cmd/yggpeers/main.go
./yggpeers

Then open http://localhost:8080 in your browser.

Configuration

Configuration is handled through environment variables:

Variable Default Description
LISTEN_ADDR :8080 Address for the HTTP server to listen on.
DB_PATH ./data/yggpeers.db Path to the SQLite database file.
REPO_DIR ./data/public-peers Path where the public-peers repo is cloned.
FETCH_INTERVAL 15m How often to pull and re-parse the public-peers repo.
CHECK_INTERVAL 5m How often to run reachability checks.
DIAL_TIMEOUT 5s Timeout for individual network dials.
MAX_CONCURRENT_CHECKS 50 Maximum number of concurrent peer checks.
BATCH_DELAY Optional delay between check batches (duration string).
CHECK_DARKNET Any non-empty value enables darknet peer checks.
DEBUG Any non-empty value enables debug logging.

License

The code of this project is released under the Unlicense. See the LICENSE file for details.

S
Description
Yggdrasil public peers explorer
https://yggpeers.fsky.net/
Readme Unlicense 423 KiB
Languages
Go 54.9%
HTML 33.3%
CSS 11.4%
Dockerfile 0.4%