anonpenguin23 deb94c071c fix(push): pin push.<domain> to one healthy nameserver for ntfy coherence (#858)
The shared ntfy push tier runs an independent instance per node with NO
cross-node shared state, so a publish and a long-lived subscriber that
round-robin DNS sends to different instances never meet (measured live: 5/5
same-node, 0/5 cross-node). The gateway fan-out compensates for the gateway
publish path, but any direct publisher (and resilience under churn) still
loses ~(N-1)/N.

Pin push.<baseDomain> to a SINGLE healthy nameserver via a specific A-record
(overrides the round-robin wildcard — exact match wins in DNS), maintained by
the existing DNS heartbeat: each nameserver deterministically picks the
lowest-IP active nameserver (no leader election needed) and prunes stale
push records, so it fails over when that node stops heartbeating. Every
publisher AND subscriber now converges on one instance => coherent, with no
duplicates (the fan-out still reaches that node). Contained to the DNS layer —
no changes to the :443/Caddy/ntfy data path. Unit-tested: lowest-IP pick,
failover+prune, no-healthy-ns safety, idempotency.
2026-06-22 19:08:30 +03:00
..