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:
- The user requests a website by entering its URL in the browser.
- The browser asks the ISP to forward the DNS query to resolve the IP address.
- The ISP forwards the query into the DNS infrastructure.
- DNS responds with a list of IP addresses for the domain name.
- 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:
| Property | What it means | Covered in |
|---|---|---|
| Name servers | DNS is distributed infrastructure, not a single server. The servers that answer queries are called name servers | Lesson 3 |
| Resource records | The DNS database stores mappings as resource records (RR) — the smallest unit of information requested from a name server | Lesson 2 |
| Caching | DNS caches at multiple layers to reduce request latency and relieve load on the global infrastructure | Lesson 5 |
| Hierarchy | Name servers are organized hierarchically — a tree structure that keeps the system scalable as domains and query volume grow | Lesson 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
| Level | What a strong answer sounds like |
|---|---|
| L4 | "DNS turns a domain name into an IP address." |
| L5 | Knows 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.