Resolving a name during a rollout
medium 7 minA stub resolver generally sends a question to a recursive resolver.
Video lesson · Chapter 1 of 4
Two callers resolve different endpoints
Theory
Read or listen first. About 2 min.
What it is
A stub resolver generally sends a question to a recursive resolver. On a cache miss the recursive resolver follows referrals to an authoritative answer. Records are cached independently for their remaining TTL. Local resolver policy, negative answers and connection reuse can all affect when a client begins using a new address.
Why it exists
During a failover the authoritative answer is correct but some customers still reach the old target. Compare the same record type through each affected resolver and record remaining TTLs. Lowering a TTL after old answers have been cached cannot retroactively shorten them. Keep the previous target safe through the transition and plan TTL changes before the cutover.
If all resolvers return the new address but requests still reach the former endpoint, inspect persistent connection reuse.
Two callers resolve different endpoints
Inside this chapter
- The DNS Hierarchy (Root, TLD, Authoritative)
- The DNS root delegates responsibility for top-level domains. Those domains delegate to authoritative zones. Caches mean most lookups do not visit every layer.
- Recursive vs. Iterative lookups
- A recursive resolver pursues an answer on behalf of the client. In an iterative exchange a server may refer the querier to another server closer to the authority.
- A, AAAA, CNAME, NS, SOA records
- A and AAAA records map names to IPv4 and IPv6 addresses. CNAME aliases another name, NS identifies nameservers, and SOA carries zone metadata used in negative caching.
- The glibc resolver (nsswitch.conf)
- System lookup policy can consult files, DNS and other sources in configured order. A DNS query tool can succeed even if the application’s full name-service lookup behaves differently.
- systemd-resolved caching behavior
- A local resolver may cache answers and route names to different upstreams by interface or domain. Record the actual lookup path before comparing two machines.
- Troubleshooting with dig, nslookup, and tcpdump
- Compare response code, answer type, resolver and timing from the affected environment. A truncated response, timed-out query and authoritative negative answer have different meanings.
- DNS TTL and Caching Strategies
- TTL limits normal reuse of an answer. Positive and negative caches can both outlive a record change. Plan migrations with the previous TTL and connection lifetime in mind.
- DNSSEC basics
- DNSSEC permits validation of signed DNS data through a chain of trust. It authenticates DNS data and does not make queries confidential.
- DNS over HTTPS (DoH) and DNS over TLS (DoT)
- DNS over HTTPS and DNS over TLS encrypt the transport to the chosen resolver. Resolver choice, caches and authoritative data still determine which answer is returned.
How it works
Step through the idea, or press Play.
Publish a record. An example authority serves a record with a 300-second TTL.
Understand it
Worked incident
Two callers resolve different endpoints
| Observation | Resolvers returning old target per 10 (resolvers) | Interpretation |
|---|---|---|
| Baseline | 0 | Resolvers agree before a planned change. |
| Incident | 7 | After cutover seven of ten sampled resolvers retain the former answer. |
| After intervention | 0 | Wait out the prior cache lifetime while both endpoints serve safely. Verify from multiple resolvers. |
Choose the next investigation
Summary
The whole topic in one minute.
A cached answer follows the TTL already supplied. Resolvers learn the new policy when they fetch again.
If all resolvers return the new address but requests still reach the former endpoint, inspect persistent connection reuse.