Layer 3 · Go deeper · 6 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
What load does a short TTL put on your authoritative servers?
Build-up · 7 steps
Follow one lookup down the tree
Resolving www.example.com from a cold cache. One recursive query, three iterative ones, two referrals, then a cache at every layer.
Step 1 of 7
Check the local caches
The browser checks its own cache, then asks the OS stub, which checks its cache and the hosts file. The stub never walks the tree itself.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“api.example.com fails over from Mumbai to Hyderabad with DNS failover records. Product wants users moved within seconds. What do you change?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Your team wants a 5-second TTL on every record, “so we can move fast”. What do you set?”
Assume 20,000 active resolvers serve your users.
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“www.example.com already CNAMEs to your CDN. Marketing wants the bare example.com served by the CDN too. What do you configure?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“DNS failed over to Hyderabad and honest resolvers followed. A Java service with a connection pool still calls Mumbai. What do you fix?”
Your move. Pick an approach: