DNS Caching, TTL, and Negative Answers
Trace how cached positive and negative answers expire and see why changing an authoritative record need not change every resolver immediately.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A cached answer has a time-limited scope
A resolver may reuse a record set within its applicable time to live. If it cached an address with 60 seconds remaining just before an authoritative update, some clients can continue receiving that value until expiry under normal caching rules. Cache keys include the relevant name, type and class. A resolver also follows applicable validation and policy rules, not merely the age of the bytes.
Absence can have its own cache lifetime
Protocols distinguish cases such as a nonexistent name and a name lacking the queried record type. Negative answers may be cached according to authority information and the rules for that response. A record created after a recent negative answer can therefore take time to become visible to those clients. HTTP cache validation provides a different freshness protocol, while latency budgets account for DNS work outside application response time.[1][2]