Networking interview question · Most asked

How does DNS resolution work, and what does a record's TTL control?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

A stub resolver asks a recursive resolver, which (if not cached) queries a root server, then the TLD server, then the domain's authoritative server, and caches the answer for the record's TTL. The TTL controls how long resolvers and clients may reuse an answer, and therefore how quickly changes propagate.

Longer Answer

Before migrations, lower TTLs at least one old-TTL period in advance. Negative answers (NXDOMAIN) are cached too, per the SOA record. Applications can cache beyond the TTL (JVM settings, connection pools that never reconnect). Cloud DNS adds private zones, split horizon and routing policies (weighted, latency, failover).

Key Points

  • Recursive resolver walks root -> TLD -> authoritative.
  • Answers cached for the TTL.
  • Lower TTLs before changes.
  • Negative caching and client caches extend staleness.

Deep dive: Cloud Networking in Production: The Migration That Took Two Days

Explanation

What interviewers look for

The full resolution path and practical TTL planning.

Follow-up questions

  • How would you migrate a domain with zero downtime?

More most-asked Networking questions

← All Networking questions

Was this page helpful?