Files
EasyDNS/docs/secondary.md
T
2026-11-22 14:21:54 +01:00

1.9 KiB

Secondary (slave)

zones:
  - name: example.net
    type: secondary
    primaries: ["192.168.1.10:53", "192.168.1.11:53"]   # tried in order
    allow_notify: ["192.168.1.10/32"]                   # default: the primaries' addresses
    transfer: { prefer: ixfr, fallback_axfr: true, timeout: 120s, max_records: 2000000 }
    # optional TSIG: add `tsig_key: xfr-key` to `transfer:` (see zone-transfer-variants.md)
    file: null    # snapshot path, default <data_dir>/zones/secondary/<zone>.zone

Life cycle:

  1. Startup: the last persisted snapshot is loaded. It is served only if the last successful refresh (from .meta.json) is within SOA EXPIRE.
  2. Refresh: SOA query (TSIG) to the primaries; if the primary serial is RFC 1982-newer, IXFR (or AXFR when no local copy); IXFR failure falls back to AXFR when enabled.
  3. Validation: the stream must be framed by identical SOAs; IXFR differences must start at the local serial and end at the announced serial; the resulting zone is fully validated. Only then is it swapped in atomically and persisted (tmp+fsync+rename). An incomplete or invalid transfer never replaces the valid copy.
  4. Timers: success → next refresh after REFRESH; failure → after RETRY; no success within EXPIRE → the zone is expired: queries get SERVFAIL (never stale authoritative data) until a refresh succeeds.
  5. NOTIFY from allowed sources (or signed with the zone's TSIG key) triggers an immediate refresh. easydns zones sync <zone> / POST /api/v1/zones/{zone}/sync too.

Status (serial, source, last/next refresh, expiry, last error): easydns zones show <zone>, GET /api/v1/zones/{zone}, metrics dns_zone_serial, dns_zone_expired, dns_zone_last_sync_timestamp_seconds.

A secondary answers authoritatively (AA) from its own copy; it never proxies queries to the primary. A secondary can itself NOTIFY further secondaries (notify:).