The Question That Traveled the World

A DNS Resolution Journey

Prologue

The Human Moment

📍 Sara's Laptop • Monday, 9:41:07 AM

Sara types eleven characters into her browser's address bar:

stripe.com

She presses Enter.

From Sara's perspective, she's simply asking for a webpage. But her browser sees a different problem entirely. "stripe.com" is just a name — a human-readable label. Names are for humans. To actually connect to Stripe's servers, the browser needs a number: an IP address.

The browser doesn't know what number belongs to "stripe.com."

So begins the search.

📚 Why DNS Exists
Computers communicate using IP addresses like 192.0.2.1. But humans can't remember numbers for every website. DNS (Domain Name System) translates human-friendly names into machine-friendly numbers. It's the phone book of the internet — you look up a name, you get a number.
◇
Chapter 1

The Cache Gauntlet

📍 Local System • 9:41:07.001 AM

Before any network traffic occurs, the question must pass through layers of memory. Each layer might already know the answer — and if it does, the journey ends early.

The Four Cache Layers
1 Browser DNS Cache MISS
2 Operating System Hosts File NO ENTRY
3 Operating System DNS Cache MISS
4 Router DNS Cache MISS

The browser checks its own memory first. Has anyone asked for "stripe.com" recently?

Browser Cache Lookup

"stripe.com" → ?

MISS — Not in browser cache

Nothing. Either Sara has never visited Stripe on this browser, or the cached answer has expired. The browser passes the question to the operating system.

The OS first checks the hosts file — an ancient mechanism that lets a computer override DNS entirely. If someone has manually written "stripe.com = 1.2.3.4" in this file, that answer wins.

Hosts File Check

/etc/hosts → "stripe.com" → ?

NO ENTRY — Not in hosts file

No manual override exists. The OS checks its own DNS cache — other applications might have asked for "stripe.com" recently.

OS DNS Cache Lookup

"stripe.com" → ?

MISS — Not in OS cache

All local caches are empty. The question must leave this computer and travel across the network.

📚 Hosts File Locations
Windows: C:\Windows\System32\drivers\etc\hosts
Mac/Linux: /etc/hosts

This file predates DNS itself. It was how the early internet worked — everyone maintained a list of all computers!
Chapter 2

A Query Is Born

📍 Stub Resolver • 9:41:07.005 AM

The operating system hands the question to its stub resolver — a small piece of software whose only job is to forward DNS questions to a real DNS server and wait for answers.

The stub resolver builds a DNS query packet. This is Query-7741 — our protagonist.

DNS Query Packet — 42 bytes

Transaction ID0x1E3D (7741)
Flags0x0100 (Standard query, recursion desired)
Questions1
Question Namestripe.com
Question TypeA (IPv4 address)
Question ClassIN (Internet)
"I am Query-7741. I carry a single question: What is the IP address of stripe.com? I've been marked with 'recursion desired' — meaning I'm asking my server to do all the hard work for me."

The query is wrapped in a UDP datagram, destination port 53 — the standard DNS port. The stub resolver sends it to the configured DNS server: 8.8.8.8 (Google Public DNS).

Query-7741 leaves Sara's laptop. It crosses her home network, passes through her router, enters her ISP's network, and travels across the internet to Google's DNS infrastructure.

📚 Why UDP?
DNS typically uses UDP (User Datagram Protocol) because it's faster than TCP — no connection setup required. For small queries and responses, the overhead of TCP's three-way handshake isn't worth it. If a response is too large (over 512 bytes), DNS will retry with TCP.
Query-7741 travels across the internet, passing through routers and switches, until it reaches its first major destination: a recursive resolver.
Entering Google's DNS Infrastructure
Chapter 3

The Recursive Resolver

📍 Google Public DNS (8.8.8.8) • 9:41:07.025 AM

Query-7741 arrives at Google's recursive resolver — a powerful server whose job is to answer DNS questions on behalf of clients. The resolver is the workhorse of DNS resolution.

Recursive Resolver

The Detective — Does the legwork to find answers

"Ah, Query-7741. You want stripe.com. Let me check my cache first..."

The resolver checks its own massive cache. Millions of users have asked questions recently — maybe someone already asked about stripe.com?

Resolver Cache Lookup

"stripe.com" → ?

MISS — Not in resolver cache

No luck. The resolver must find the answer the hard way — by asking the DNS hierarchy directly. This is where the "recursive" in "recursive resolver" comes from: it will recursively query other servers until it finds the answer.

"The resolver has taken responsibility for my question. It will ask other servers on my behalf and return when it has an answer. I wait here while it does the detective work."

The resolver begins at the very top of the DNS hierarchy: the root servers.

Chapter 4

The Root of All Names

📍 Root DNS Server • 9:41:07.030 AM

The resolver sends a query to one of the 13 root server addresses. These aren't 13 individual machines — each address is actually served by hundreds of servers distributed worldwide using anycast routing.

Root Server (a.root-servers.net)

The Librarian — Knows who manages each top-level domain

"stripe.com? I don't know that specific name. But I see '.com' at the end. Here are the servers that manage ALL .com domains. Ask them."

The root server doesn't know stripe.com's IP address — and it never will. Root servers only know one thing: who manages each top-level domain (TLD). They're like a librarian who doesn't know every book, but knows which section each book belongs to.

Root Server Response — Referral

Answer(none)
Authority SectionNS records for .com
Referrala.gtld-servers.net, b.gtld-servers.net, ...

The root server provides a referral — not an answer, but a pointer to servers that might know more. The resolver follows this lead.

📚 The 13 Root Servers
Named A through M (a.root-servers.net to m.root-servers.net), these are operated by different organizations: ICANN, Verisign, NASA, the US Army, and others. Together they handle trillions of queries per day. Without them, domain names wouldn't work.
Chapter 5

The TLD Server

📍 .COM TLD Server (Verisign) • 9:41:07.045 AM

The resolver now queries a .com TLD server — operated by Verisign, which manages the entire .com registry containing over 150 million domain names.

.COM TLD Server (a.gtld-servers.net)

The Registrar — Knows who owns each .com domain

"stripe.com? Yes, that domain is registered. Its authoritative nameservers are ns1.stripe.com and ns2.stripe.com. Ask them for the actual IP address."

The TLD server knows about stripe.com — but still doesn't know its IP address. It only knows which nameservers are authoritative for that domain. These nameservers are designated by Stripe when they registered their domain.

TLD Server Response — Referral

Answer(none)
Authority SectionNS records for stripe.com
Referralns1.stripe.com, ns2.stripe.com
Glue Recordsns1.stripe.com → 198.51.100.1

Notice the "glue records" — these are IP addresses included with the referral. Without them, we'd have a chicken-and-egg problem: how do you find ns1.stripe.com if you need to ask ns1.stripe.com?

📚 TLD Hierarchy
Generic TLDs: .com, .org, .net, .edu, .gov
Country Code TLDs: .uk, .de, .jp, .in
New TLDs: .app, .dev, .io, .xyz

Each TLD has its own set of servers managed by different organizations.
Chapter 6

The Authoritative Server

📍 Stripe's Nameserver • 9:41:07.060 AM

The resolver reaches the final destination: Stripe's own authoritative nameserver. This server has the actual answer — the IP address that Sara's browser needs.

ns1.stripe.com (Authoritative)

The Source of Truth — Knows exactly where stripe.com lives

"stripe.com? That's MY domain. The answer you seek is 192.0.2.50. This record has a TTL of 300 seconds — cache it for 5 minutes."

Finally! The authoritative server responds with an actual answer — not a referral, but the IP address itself.

Authoritative Response — THE ANSWER

Answerstripe.com → 192.0.2.50
Record TypeA (IPv4)
TTL300 seconds (5 minutes)
AuthoritativeYes ✓
"The resolver has found my answer! stripe.com lives at 192.0.2.50. Now begins the journey home — every server that helped will cache this answer so future queries are faster."
📚 TTL (Time To Live)
The TTL tells caches how long to remember this answer. A short TTL (60-300 seconds) allows rapid updates. A long TTL (86400 seconds = 1 day) reduces DNS traffic but means changes propagate slowly. Stripe uses 300 seconds — a balance between flexibility and performance.
With the answer in hand, the resolver begins its return journey. But this isn't just a simple trip back — it's a caching cascade that will make future queries instant.
The Return Journey Begins
Chapter 7

The Return Journey

📍 Traveling Home • 9:41:07.070 AM

The resolver now has the answer. Before sending it back to Sara's computer, it caches the result — and every other piece of information it learned along the way.

The Caching Cascade
1 Resolver caches: stripe.com → 192.0.2.50 TTL: 300s
2 Resolver caches: stripe.com NS records TTL: 86400s
3 Resolver caches: .com NS records TTL: 172800s

The resolver sends the answer back to Sara's computer. The stub resolver receives it, and the OS caches it. The browser receives it, and the browser caches it too.

Query-7741's mission is complete. Total time elapsed: 63 milliseconds.

Sara's Browser: "I now know that stripe.com is at 192.0.2.50. I can establish a TCP connection to that IP address and request the webpage. Sara will never know about Query-7741's epic journey — to her, the page just... loaded."
Chapter 8

The Power of Memory

📍 Five Minutes Later • 9:46:07 AM

Sara visits stripe.com again. This time, the journey is very different.

Browser Cache Lookup

"stripe.com" → ?

HIT — 192.0.2.50 (TTL: 237s remaining)

The browser finds the answer in its own cache. No network traffic required. No DNS servers contacted. The answer arrives in under 1 millisecond.

Second Visit — Cache Hit
✓ Browser Cache HIT — 0.2ms

This is why DNS caching exists. The full resolution took 63 milliseconds and required queries to four different servers. The cached lookup took less than a millisecond and required zero network traffic.

Now imagine this multiplied by billions of DNS queries per day, across millions of users. Caching isn't just an optimization — it's what makes DNS scale to internet size.

📚 Cache Hierarchy Efficiency
When Sara's neighbor asks for stripe.com, Google's resolver already has the answer cached. When a different Google user asks, same result. A single authoritative lookup serves millions of users through cascading caches. This is why changing DNS records takes time to "propagate" — old answers remain cached until their TTL expires.
Epilogue

The Connection

📍 Sara's Browser • 9:41:07.070 AM

With the IP address in hand, Sara's browser can finally do what it wanted to do all along: establish a TCP connection to Stripe's servers and request the webpage.

The DNS resolution that just occurred — Query-7741's entire journey — happened in the space between Sara pressing Enter and the first pixel appearing on her screen. She never saw it. She never knew about it.

But without it, the modern internet wouldn't work.

Every website you visit, every app that connects to the cloud, every email you send — all of them begin with a DNS query. A question that travels the world, bouncing between servers, following the hierarchy from root to TLD to authoritative, until it finds the number that matches a name.

Query-7741's Complete Journey
1Browser CacheMISS
2OS Hosts FileNO ENTRY
3OS DNS CacheMISS
4Recursive ResolverMISS → QUERY
5Root ServerREFERRAL → .com
6TLD Server (.com)REFERRAL → stripe
7Authoritative ServerANSWER!
8Return + Cache63ms total

DNS is invisible infrastructure — the translation layer that turns human intent into machine communication. Every second, billions of queries traverse this hierarchy, transforming names into numbers, making the internet navigable.

Query-7741 was one of trillions. But now you know its story.

— THE END —