A health-aware DNS server
6.2K
A Healthy DNS is a work-in-progress authoritative UDP DNS server for one hosted zone and optional alias zones. It serves ordinary static IPv4 A records, TCP-health-checked A records, or both in the same zone.
The server is intended for operators who need a small, startup-configured authoritative service whose in-memory answers follow backend reachability. It can run directly, as a Docker container, or as an AWS ECS Anywhere task on an external VM. It is not a recursive resolver or a general-purpose authoritative DNS implementation.
This local example uses UDP port 53053, so it does not require host port 53. The www record is static; checked demonstrates the health-checked configuration shape.
docker run -d \
--name a-healthy-dns \
-p 127.0.0.1:53053:53053/udp \
indisoluble/a-healthy-dns \
--port 53053 \
--hosted-zone example.local \
--zone-resolutions '{"www":["192.168.1.200"],"checked":{"ips":["192.168.1.100","192.168.1.101"],"health_port":8080}}' \
--ns '["ns1.dns.example.net"]'
Verify the listener, authoritative apex, static answer, and logs:
docker ps --filter name=a-healthy-dns
dig @127.0.0.1 -p 53053 example.local SOA
dig @127.0.0.1 -p 53053 www.example.local A
docker logs --tail 50 a-healthy-dns
Static records become visible on the updater's first refresh. Repeat the A query if it races startup. The untagged image is suitable for this local example; production deployments should pin a version and apply the deployment guidance.
Requires Python 3.11 or newer.
git clone https://github.com/indisoluble/a-healthy-dns.git
cd a-healthy-dns
python3 -m venv .venv
source .venv/bin/activate
pip install .
a-healthy-dns \
--hosted-zone example.local \
--zone-resolutions '{"www":["192.168.1.200"],"checked":{"ips":["192.168.1.100","192.168.1.101"],"health_port":8080}}' \
--ns '["ns1.dns.example.net"]'
From another terminal, verify the foreground process:
dig @127.0.0.1 -p 53053 example.local SOA
dig @127.0.0.1 -p 53053 www.example.local A
SOA and NS data plus publishable IPv4 A records. Valid EDNS(0) requests receive a fixed 512-byte EDNS response envelope, but larger-payload negotiation and option-specific processing are not supported. IPv6 answers, recursion, transfers, and DNS-over-TCP remain outside scope.ANY minimization are defined in the RFC conformance contract.SIGINT and SIGTERM stop the UDP service and background updater cleanly.The returning-maintainer path is README -> Project brief -> Architecture.
| Reader intent | Go to |
|---|---|
| Understand purpose, capabilities, and lifecycle | Project brief |
| Configure records, zones, timing, or DNSSEC inputs | Configuration reference |
| Understand durable behaviour and constraints | Requirements |
| Understand components, flows, concurrency, and invariants | Architecture |
| Verify DNS response semantics and RFC scope | RFC conformance |
| Deploy and harden with Docker or AWS ECS Anywhere | Docker deployment |
| Diagnose a missing or unexpected answer | Troubleshooting |
| Find implementation, testing, CI, or release guidance | Documentation index |
Content type
Image
Digest
sha256:aacf8419e…
Size
31.2 MB
Last updated
4 days ago
docker pull indisoluble/a-healthy-dns