Debugging war story: the mystery of NXDOMAIN
Dec 7, 2016Ivan Babrou

Summary
This post details a debugging war story where transient packet loss on the internal network caused DNS lookups to fail with NXDOMAIN errors. The root cause was identified as the interaction between DNS query timeouts, the `search` option in `/etc/resolv.conf`, and a custom DNS server that dropped specific requests while returning NXDOMAIN for others. The post outlines the investigation process, including load testing, network packet analysis, and the creation of a proof-of-concept DNS server to replicate the issue. Solutions proposed include tuning `timeout` and `retries` in `resolv.conf` to better handle transient network issues.
More from the DNS Infrastructure & Naming Conventions trail
- The keys to the Internet change on October 11, 2026. Are you ready?
- 1.1.1.1 now supports post-quantum DNSSEC, all 2,420 bytes of it
- How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache
- BGP ORIGIN attribute manipulation and its impact on the Internet
- Cloudflare Internal DNS is now generally available