DNS β Part 3: Query Resolution & Advanced Caching
What is this?
Picture asking a relentlessly helpful concierge to find someone's phone number. You don't want to be sent on a chase β "go ask the front desk, then ask the directory, then ask their office." You just say "find me Alice's number," and the concierge does all the legwork and comes back with one answer. Behind the scenes, though, the concierge is running that chase β front desk, then directory, then office β one step at a time.
That's exactly the split at the heart of DNS resolution. You (and your OS) make one simple request β "give me the IP for www.maang.io" β and expect a finished answer. The recursive resolver plays concierge: it shoulders the whole journey down the tree from Part 2, asking the root, then the TLD, then the authoritative server, one iterative step at a time, until it has the answer to hand back. This chapter is about that division of labor, the caching that makes it fast, and the TTL rules that govern how long answers live.
The one-line idea: DNS resolution is one recursive request (you β resolver, "just get me the answer") that the resolver fulfills with a series of iterative queries down the tree β and aggressive caching at every layer means most lookups never make that journey at all.
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson