DNS
The problem
Humans need to refer to services by memorable names (example.com) while machines route traffic using numeric IP addresses — DNS is the directory service that translates between the two, at global scale, without any single server having to know every name in existence.
Why now
IP addressing established that machines are found by number, not name; DNS is the missing translation layer. Trees already explained hierarchical namespaces with fast, delegated lookup — DNS's domain structure (root, then .com, then example, then www) is that exact tree, distributed across millions of servers instead of stored in one place.
Mental model
DNS is a distributed tree lookup: the root knows only who handles .com, .com's servers know only who handles example.com, and example.com's own server knows the actual IP. No single server holds the whole tree — each level delegates to the next, exactly like asking for directions in stages instead of needing a full map upfront.
Requires
- IP Addressing & RoutingNetworking
DNS's entire purpose is producing an IP address from a name; you need to know what an IP address is and why it's needed for routing before DNS's translation job makes sense.
- TreesComputer Science Fundamentals
The domain namespace (root → TLD → domain → subdomain) is structured as a tree, and DNS resolution is a top-down tree traversal delegating to the next level at each step.
Unlocks
Used in
- Every domain name lookup behind every web request, email, and API call
- CDN routing (DNS often returns different IPs based on the requester's location)
- Service discovery in internal systems (resolving a service name to a current instance)
- DNS-based outages — understanding why 'the internet is down' is often actually 'DNS is down'
Projects
- Use dig or nslookup to trace a real DNS resolution from root servers down to the final A record
- Explain what would break, and what wouldn't, if DNS were unavailable but IP addresses were still known
Examples
- Resolving www.example.com involves asking a root server, then a .com server, then example.com's own nameserver
- Many outages that look like 'the whole internet is broken' are actually just DNS failing to resolve names to IPs
Resources
Mastery checklist
- I can explain DNS resolution as a top-down tree traversal with delegation at each level
- I can use dig or nslookup to inspect a domain's DNS records
- I can explain the difference between a DNS record type (A, CNAME, MX) at a high level
- I can explain why DNS caching (TTL) exists and the tradeoff it makes