Resolver ops
Stub and recursive notes for operators who are exercising the crate, not shipping it as a public resolver.
The overview page still warns that the Client can wait forever. That is not a slogan. On Rust stable the socket options the crate wants are still thin, so a query that never comes back can pin a thread. Treat every lab resolver as a process you can kill.
Stub timeout ledger
Lammas 2026 revisited the UDP idle path so a stub is less likely to sit on a dead nameserver through a whole harvest weekend of tests. The warning on the home page stays. UDP still needs the same honesty: if the peer is silent, fail the query and let the caller retry or walk the next NS.
On 14 Feb 2024 a bench on the TCP client showed a hung read while pulling a modest zone over a lossy loopback pair. The fix was an explicit read deadline on the handoff, not a rewrite of the state machine.
Deep winter 2021 is when the first authority relocation rehearsal proved that a resolver with no deadline will follow a stale NS until someone restarts the process.
- UDP first
- Use
UdpClientConnectionfor ordinary queries. Watch for TC bits and promote to TCP only when the answer will not fit. - TCP when asked
TcpClientConnectionandTcpHandlerown the stream. Set a read deadline before you ask for AXFR or a large TXT bundle.- Do not hide errors
- The crate goal is that every error is handled. A timeout is an error. Log it, surface it, and do not pretend the nameserver answered.
Crate modules that match this page: client, udp, tcp, and error.