Name Resolution and a Cached Answer

A resolver can reuse a previous name-resolution response according to its cache rules. Knowing which cache supplied it helps explain what address a client observes.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace one address change
  2. Check the queried record type
  3. Follow a cached answer through its lifetime
  4. Identify every layer that may retain an answer

Trace one address change

An earlier query can return one address and a later authoritative answer another. A client with a still-usable cached first result can continue using it. See DNS caching rules.

Check the queried record type

An application may request IPv4 and IPv6 results separately, with one present and the other missing. Hostname and address distinctions explain why a name can have several independent results.[1][2]

Follow a cached answer through its lifetime

Suppose a resolver stores one answer for sixty seconds. If the authoritative configuration changes after thirty seconds, a client using that cached answer may still choose the old address within its lifetime. Other clients can refresh at different times. See invalidation of cached results.

t=0: cached address A with lifetime 60 s
t=30: authoritative answer changes to B
t=45: cached A may still be returned
After expiry, lookup can obtain B under normal refresh rules

Identify every layer that may retain an answer

A browser, system or recursive resolver can retain state under its own rules. A reused network connection also outlives some lookups. Inspect which answer and connection the application actually used.

References

  1. Larry Peterson and Bruce Davie, Computer Networks: A Systems Approach ↩
  2. IETF, RFC 9110: HTTP Semantics ↩