Heimdall DNS v0.1.6

❤️ (@Sully) ❤️ (@Sully)

Heimdall DNS v0.1.6

This is a single-change release. metrics.json is now scoped to the zones the server is actually configured for. Previously, any domain that was queried could end up in the file - including recursive lookups for names you don't host, and junk aimed at the server.

What changed

  • Only configured zones are counted. A query for a name outside every loaded zone is ignored, so the file no longer grows arbitrary domain names.
  • Multi-part public suffixes are handled correctly. The old rule aggregated each query to its last two labels, so every .co.uk domain you hosted collapsed into one shared co.uk counter (likewise .org.uk, .com.au, and friends). Each domain now gets its own entry.
  • Longest match wins. A query is attributed to the most specific zone that encloses it, so a delegated sub-zone gets its own bucket instead of folding into its parent.
  • Matching respects label boundaries. notexample.com no longer matches example.com.
  • Reload aware. The zone list is re-applied on SIGHUP, and counters for domains that are no longer configured are dropped at the next flush. Stale entries in an existing metrics.json are cleaned up on startup.

Before and after

Hosting example.co.uk and example.org.uk, with some recursive traffic passing through:
// v0.1.5
"domains": {
  "co.uk":       { "2026-08-05": {"q": 210, "hit": 40, "miss": 170, "nx": 12} },
  "org.uk":      { "2026-08-05": {"q":  95, "hit": 15, "miss":  80, "nx":  4} },
  "blocklist.example.net": { "2026-08-05": {"q": 880, "hit": 12, "miss": 868, "nx": 70} }
}

// v0.1.6
"domains": {
  "example.co.uk":  { "2026-08-05": {"q": 210, "hit": 40, "miss": 170, "nx": 12} },
  "example.org.uk": { "2026-08-05": {"q":  95, "hit": 15, "miss":  80, "nx":  4} }
}

Queries for www.example.co.uk and any other subdomain roll up into the example.co.uk entry, as before.

Upgrade notes

  • Bucket keys change. If you have a dashboard or script keyed on co.uk, org.uk, or any other collapsed public suffix, it needs to point at the full domain name instead. This is the only breaking part of the release.
  • Entries for domains you don't host will disappear at the next flush. Historical counters for zones you do host are preserved across the upgrade.
  • metrics.json is no longer total query volume. Recursive traffic for names you don't host is not counted anywhere in it. If you were using the file as a rough traffic counter, use the CHAOS TXT record stats.heimdall instead - it reports total queries, cache hit-rate, and uptime.
  • No configuration changes required. No new directives, and the existing metrics, metrics-file, metrics-retention, and metrics-flush settings behave as before.

Replies (0)

No replies yet.

Log in to reply.