Lesson 02Name & Address
DNS Cache & TTL
A full resolution is expensive (five servers, many round-trips). DNS solves this by storing answers for a while, counted down by a number called TTL.
- Layer
- Layer 7 · Application, port 53
- Reference
- RFC 1035 / RFC 8767
- Steps
- 6
NETLEARN · your study buddy
Net · guide
Hi! I’m Net, your guide today. We’ll look at DNS Cache & TTL in the DNS: The Internet’s Phone Book module.
how it works
tap Net · advance one step⟲ button · start overEnter · open the full explanation
legendrequestresponsecontrolmessage in flight
Common misunderstandings
- The DNS cache on your computer can hold changes back too. If a site moved to a new IP but you're still hitting the old one, clear your local cache.
Key notes
- High vs low TTL
- A high TTL saves queries but changes spread slowly; a low TTL is the reverse. Many domain owners lower the TTL before migrating.
- Negative caching
- A "not found" answer (NXDOMAIN) is cached too, so a wrong name isn't asked over and over.
- Layered
- The browser, OS, router, and resolver each have their own cache. The answer can come from any of them.
- Serve-stale
- When a resolver fails to answer, some serve an expired old answer to avoid an error.
