Writing / 21 Aug 2026

DNS is the quiet dependency

Every connection starts with a lookup. When the resolver is slow, the whole internet feels broken.

DNS is the most successful distributed system most people never think about. It is also the first thing that breaks when a network gets flaky, and the last thing anyone checks.

The failure mode is familiar: a browser spins, a CLI tool hangs, someone says “the internet is down”, and then a curl to an IP address works fine. The path was never the problem. The lookup was.

The first request is a lookup

Every new connection begins with a name that has to become an address. That lookup can involve:

  • the stub resolver on the host;
  • a local caching resolver;
  • a recursive resolver at the ISP or a public service;
  • authoritative servers for the zone;
  • DNSSEC validation along the way.

Each step adds latency and a new failure mode. A resolver with a cold cache may need to walk the tree; a resolver with a broken path to the root may still answer cached names and fail only for new ones. That is why “DNS works” is not a useful statement. The useful question is: which lookup, from which resolver, with what cache state?

TTL is a contract

TTL is not a suggestion. It is the maximum time a resolver may cache the answer, and it is also a promise about how quickly a change will propagate. A five-second TTL on a production name does not make the internet faster; it makes every client ask more often, and it makes your authoritative servers part of the hot path.

The opposite mistake is worse in a different way: a one-hour TTL on a record you need to change during an incident. You will spend the first hour of the incident waiting for caches to expire.

A reasonable default for small sites is five to thirty minutes for stable records, shorter only when you have a specific reason and the infrastructure to absorb the query volume. Negative answers have their own TTL, usually derived from the SOA minimum, and they matter too: a typo that returns NXDOMAIN can be cached just as stubbornly as a valid address.

Two resolvers, two paths

Every host should have at least two resolvers, and they should not share a single point of failure. Two IPs on the same box, or two anycast addresses that both fail when your upstream does, are not redundancy. They are decoration.

For a small network, a local caching resolver plus a public fallback is often enough. For anything that matters, put the resolvers on different network paths and monitor both. If one resolver is consistently slower, clients may still prefer it; measure, do not assume.

Privacy versus visibility

Encrypted DNS is a good default for clients on untrusted networks. It also removes the resolver logs from the local network, which is exactly where you might have used them for troubleshooting.

The trade-off is not “privacy or observability”. It is “who gets to see the query, and for how long”. A local resolver with a short retention window can give you aggregate latency and error rates without keeping a browsing history. If you run one, restrict recursion to your own clients. An open resolver is a DDoS amplifier and a liability.

Measure the resolver, not just the network

The useful signals are simple:

  • query latency, ideally by name or zone;
  • SERVFAIL and timeout rates;
  • NXDOMAIN rate, which often spikes before a user reports a typo;
  • cache hit ratio, if your resolver exposes it;
  • the age of the process and its upstream configuration.

dig is still the best first tool:

# Ask a specific resolver, show timing
dig +stats @1.1.1.1 example.com A

# Follow the delegation chain
dig +trace example.com

# Check what the local stub actually uses
resolvectl query example.com

If a name resolves from one resolver and not another, compare the answers, the flags, and the TTLs. If the answer is SERVFAIL, check DNSSEC validation before you blame the zone. If it is NXDOMAIN, check the name, not the network.

A small checklist

  • Know which resolver each host actually uses.
  • Keep recursion closed.
  • Use two resolvers on different paths.
  • Set TTLs deliberately, and document why.
  • Monitor SERVFAIL, timeouts, and latency.
  • Test the negative path, not just the happy one.
  • Keep query logs short-lived and access-controlled.

DNS is quiet because it usually works. When it stops working, it takes everything else with it. Treat it like a dependency, not a detail.