Free preview

Why DNS Exists and What It Does

Why this matters: DNS is the first hop of almost every request on the internet. It runs before your load balancer, before your TLS handshake, before any code you wrote — and when it fails, your service is unreachable no matter how healthy it is.

Key takeaway

The Domain Name System (DNS) is a naming service that maps human-friendly domain names to machine-readable IP addresses. The process is transparent to users: the browser queries DNS to translate the name, then forwards the request to the destination server.

The origins: a phone book for the internet

Mobile phones associate a unique number with each user. As your contacts grow you stop memorizing numbers and rely on a contact list instead.

Computers are identified the same way — by IP addresses such as 104.18.2.119. Since humans cannot remember an IP for every website, we need a directory that maps domain names to addresses.

DNS is that phone book. You look up a name; you get back a number you can actually dial.

What happens when you type a URL

The resolution flow, end to end:

Step by step:

  1. The user requests a website by entering its URL in the browser.
  2. The browser asks the ISP to forward the DNS query to resolve the IP address.
  3. The ISP forwards the query into the DNS infrastructure.
  4. DNS responds with a list of IP addresses for the domain name.
  5. The IP addresses reach the browser, which then connects to the web server.

This resolution occurs in milliseconds, minimizing user delay. Browsers also cache frequently used mappings to speed it up further.

The pieces that make it work

Four properties of the DNS infrastructure, each expanded in its own lesson:

PropertyWhat it meansCovered in
Name serversDNS is distributed infrastructure, not a single server. The servers that answer queries are called name serversLesson 3
Resource recordsThe DNS database stores mappings as resource records (RR) — the smallest unit of information requested from a name serverLesson 2
CachingDNS caches at multiple layers to reduce request latency and relieve load on the global infrastructureLesson 5
HierarchyName servers are organized hierarchically — a tree structure that keeps the system scalable as domains and query volume growLesson 3

Key takeaway

DNS turns a memorable name into a routable address, and it does so through a distributed, cached, hierarchical system that no single organization owns. It is the largest and oldest distributed system most engineers use every day without noticing.

Interview signal by level

LevelWhat a strong answer sounds like
L4"DNS turns a domain name into an IP address."
L5Knows it's in the path: "the client resolves the name first, and that lookup is usually cached — a cold lookup costs an extra round trip."
Staff+Treats it as a dependency: "DNS returns a list of addresses, so it's my first load-balancing and failover layer. It's also a hard availability ceiling and a blast-radius risk — a bad record takes out everything behind that name."

Next: what is actually stored in the DNS database.

Enjoying the preview?

Create a free account to unlock the rest of this course, the in-browser judge, and live AI mock interviews.

Sign up free to continue