11. Interview Framing
The questions that actually get asked, and the sharpest honest answer to each
Q: Walk me through what happens when you type a URL into the browser.
Browser cache checked, then OS cache - most requests end there. On a miss, the recursive resolver takes over and iteratively queries root → TLD → authoritative, caches the result, and returns the IP. Only then does the browser open a TCP/TLS connection and send the actual HTTP request.
Q: What's the difference between recursive and iterative DNS resolution?
Recursive is the contract between the client and its resolver - one question, one final answer. Iterative is what the resolver does internally against root, TLD, and authoritative servers - each gives a referral, never the final answer, and the resolver follows each hop itself.
Q: Why does DNS mostly use UDP instead of TCP?
Most DNS responses are small enough to fit in a single UDP packet, and UDP avoids the connection setup overhead of TCP - meaningful at the scale DNS operates at. DNS falls back to TCP when a response is too large (some DNSSEC responses, zone transfers).
Q: How would you use DNS to route users to the nearest data center?
GeoDNS at the authoritative layer - resolve the same hostname to different IPs based on the resolver's apparent location, paired with a low-enough TTL that a region failover is actually noticed in reasonable time.
Q: Your team just migrated to a new server, but some users still hit the old one. Why?
DNS propagation delay - some resolvers cached the old record and won't ask again until that TTL expires. The real fix, going forward: lower the TTL before a planned migration, not after.