Build This Now
Build This Now
What Is Claude Code?Claude Code InstallationClaude Code Native InstallerYour First Claude Code Project
speedy_devvkoen_salo
Blog/Handbook/Core/How the Internet Works: The Trip Your Click Takes Around the Planet

How the Internet Works: The Trip Your Click Takes Around the Planet

A visual walkthrough of what happens between typing a URL and the page loading: DNS, packets, routing, undersea cables, fiber optics, servers, and TCP, all in about 200 milliseconds.

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

Published Jun 3, 20269 min readHandbook hubCore index

You type a URL, hit enter, and a page from a machine on the other side of the planet shows up in about 200 milliseconds. That single click triggers a name lookup, splits your request into many pieces, sends them through routers and undersea cables as pulses of light, hits a server, and reassembles the answer, all faster than you can blink.

Most people use the internet every day and never see the machine underneath. This post is the machine.

A globe with network traffic from cities around the world converging on a single server, labeled with its IP address, surrounded by the concepts that make it work: TCP/IP, DNS, packets, routing, fiber, HTTP. Every request from everywhere converges on one machine, an address like 104.18.32.7, and the answer travels all the way back. Here's how.

This walkthrough was inspired by Dan Hollick's excellent chapter "How the internet works" in Making Software. His diagrams are the gold standard for explaining technical systems visually. The illustrations below are our own, built to teach the same ideas, but if you want the definitive deep-dive, buy his book.

Table of Contents

  1. Step 1: DNS turns a name into a number
  2. Step 2: Your request is shattered into packets
  3. Step 3: Each packet finds its own route
  4. Step 4: It crosses under the ocean
  5. Step 5: It travels as pulses of light
  6. Step 6: A server answers
  7. Step 7: Out of order, then rebuilt
  8. All of it, every click
  9. Frequently Asked Questions

Stop configuring. Start building.

SaaS builder templates with AI orchestration.


Step 1: DNS turns a name into a number

Computers don't know names. They know numbers. google.com means nothing to the network, but 142.250.190.78 does. DNS, the Domain Name System, is the phone book that does the translation.

When you type a name your browser has never seen, it hands the name to a DNS resolver and gets back an address:

A search bar with a domain name pointing down to an isometric DNS resolver machine, which returns the IP address 104.18.32.7. You type a name. The resolver does the work and hands back a number your machine can actually route to.

Behind that single hop, the resolver (usually run by your ISP or a service like Cloudflare's 1.1.1.1) walks a short chain on your behalf. It asks the root servers, which point it to the .com servers, which point it to the site's own authoritative server, which finally returns the IP address. Four quick lookups, hidden behind one request.

Then it's over: the answer gets cached at every level, so the next time you visit, the lookup is instant. This is why a site feels slightly slower the very first time you load it and snappy forever after.

Step 2: Your request is shattered into packets

You can't send a whole file across the internet in one piece. The network moves data in small, fixed-size chunks called packets, typically around 1,400 bytes each. Your request is small; the page that comes back, with all its images, fonts, and scripts, gets split into many of them.

A single file, index.html, fanning out into six numbered packets, each one stamped with the same destination address, 104.18.32.7. One file splits into many numbered packets, each carrying the same destination stamp.

Look at what each packet carries. Every one is stamped with a destination (to ·104.18.32.7) and a sequence number (#01, #02, #03...). That little header is the address label; the rest of the packet, the payload, is a single slice of your file.

The stamp is the clever part. Because every packet knows where it's going and where it fits in line, the pieces don't have to travel together or arrive in order. A single 2 MB photo becomes roughly 1,400 of these envelopes, each free to take its own path across the world.

Step 3: Each packet finds its own route

There is no single wire from you to the server. The internet is a mesh of routers, and each one makes a local decision: "given where this packet is headed, who's the best neighbor to hand it to next?"

Routing diagram: four packets leaving your browser take four different colored paths through the network to reach the same server. Each packet can take its own route. They converge on the same destination by different paths.

This is what makes the internet resilient. If a cable is cut or a router is overloaded, packets simply route around the damage. The network was literally designed to survive pieces of itself going down. The cost of that resilience is that packets can, and do, arrive out of order, take different amounts of time, or get lost entirely. (We fix that in Step 7.)

Step 4: It crosses under the ocean

Here's the fact that surprises people most: the internet is not mostly wireless or satellite. Around 99% of international data runs through physical cables lying on the ocean floor.

Undersea cable map: lines fanning out from Europe across the globe to other continents, with the stat that 99% of overseas traffic runs through undersea cables and 500+ cables wire the planet. Over 500 cables wire the planet together along the sea floor.

More than 500 of these cables, some thousands of kilometers long, physically connect the continents. When you load a site hosted in another country, your packets are quite literally crossing an ocean inside a cable about as thick as a garden hose. Satellites and 5G get the headlines; the actual backbone is glass on the seabed.

Step 5: It travels as pulses of light

Inside those cables, your data isn't electricity. It's light.

Fiber optic diagram: a beam of light bouncing down the glass core of a fiber cable, with the core and cladding labeled. Each pulse of light bounces down a glass core thinner than a human hair, at close to the speed of light.

A fiber optic cable is a strand of ultra-pure glass thinner than a human hair. Your 1s and 0s become flashes of light that bounce down that glass core, kept from escaping by a surrounding layer called the cladding. Because light in glass moves at roughly two-thirds the speed of light in a vacuum, a signal can cross an ocean in tens of milliseconds. This is the single biggest reason the whole round trip fits inside the blink of an eye.

Step 6: A server answers

Your packets finally arrive at their destination: the origin server, the machine that actually holds the website.

Server diagram: a request arrives at the origin server, which finds the page and ships it back, broken into packets again. The server reads your request, finds the page, and ships it back, broken into packets all over again.

The server reassembles your incoming packets into a complete request, reads it ("the user wants the homepage"), finds or builds the page you asked for, and then ships the response back to you. And the response makes the exact same journey in reverse: shattered into packets, routed independently, sent as light through the same cables. Everything you just read happens twice per click, there and back.

Step 7: Out of order, then rebuilt

Remember that packets take different routes and some get lost. So how does a jumbled, incomplete stream of envelopes become a perfect, pixel-for-pixel copy of the page? TCP, the Transmission Control Protocol.

TCP reassembly diagram: packets arriving out of order (03, 01, missing, 04, 02) are reordered by TCP into a clean sequence (01, 02, 03, 04, 05), with the missing one re-requested. TCP uses the sequence numbers to put everything back in order and re-requests anything that went missing.

TCP uses the sequence number in every packet's header to do two jobs. First, it reorders: no matter what order the envelopes arrive in, it lays them back out in the right sequence. Second, it repairs: if a packet never shows up, TCP notices the gap and asks the server to send that one again. That's why a slow connection makes a page load gradually instead of arriving corrupted. TCP is quietly refusing to hand you anything until it's complete and correct.

All of it, every click

Put the seven steps together and this is the full picture:

Recap diagram: the whole journey from YOU through DNS, packets, routing, cables, and back to the page, completed in about 200ms across the planet. Name lookup, packetizing, routing, an ocean crossing as light, a server response, and reassembly, start to finish in about 200 milliseconds.

DNS turns the name into a number. Your request is shattered into packets. Each packet routes itself across the network. They drop into undersea cables and cross whole oceans as pulses of light. A server catches them, reads the request, and sends the page back. TCP puts everything back in order and refills whatever got lost.

All of that, every single click, in roughly the time it takes to blink.

Understanding the machine underneath isn't just trivia. The same primitives, addresses and lookups, requests split into pieces, retries on failure, putting things back in order, are exactly the patterns you wire up when you build software on top of it. The internet is just the first and biggest example of a system that turns out to be understandable once someone draws it for you.

That's the whole idea behind Build This Now: the production plumbing, auth, payments, database security, background jobs, is the same kind of "invisible machine," and you shouldn't have to rebuild it by hand to ship a product. You describe what you want, and 18 AI agents wire up the parts. See how it works →

Frequently Asked Questions

What actually happens when you type a URL and press enter?

Your browser first uses DNS to translate the domain name into an IP address. It then opens a connection to that address and sends an HTTP request, which is broken into packets. Those packets route independently across the network, often through undersea fiber optic cables, to the origin server. The server sends the page back the same way, and TCP reassembles the packets in the correct order before your browser renders the page. A round trip to the other side of the planet typically takes around 200 milliseconds.

What is DNS in simple terms?

DNS, the Domain Name System, is the internet's phone book. Computers communicate using numeric IP addresses, not names, so DNS translates a human-friendly name like google.com into a machine-friendly address like 142.250.190.78. The lookup walks from a resolver to the root servers to the top-level-domain servers to the site's authoritative server, then the result is cached so repeat visits are instant.

What is a packet?

A packet is a small, fixed-size chunk of data, usually around 1,400 bytes, that the internet uses to move information. Large files are split into thousands of packets. Each packet has a header containing its source address, destination address, and sequence number, plus a payload carrying a slice of the data. Headers let packets travel independently and still be reassembled in the right order on arrival.

Does the internet really run on undersea cables?

Yes. Roughly 99% of international internet traffic travels through physical fiber optic cables laid on the ocean floor, not through satellites. More than 500 submarine cables connect the continents. Satellites and wireless handle the last hop to your device, but the global backbone is glass on the seabed.

How is the internet so fast?

Three reasons. Data travels as pulses of light through fiber optic glass at roughly two-thirds the speed of light. DNS results and content are cached at many layers, so repeat lookups and page loads skip most of the work. And packets route in parallel across many paths at once instead of waiting in a single line. Together these keep a planet-spanning round trip down to roughly 200 milliseconds.

What is the difference between TCP and IP?

IP (Internet Protocol) handles addressing and routing: getting individual packets from a source address to a destination address across the network. TCP (Transmission Control Protocol) sits on top of IP and handles reliability: it numbers the packets, reorders them on arrival, and re-requests any that were lost, so the data arrives complete and in order. People often say "TCP/IP" together because they're used as a pair.


Diagrams by @speedy_devv. Concept inspired by Dan Hollick's Making Software.

Continue in Core

  • 1M Context Window in Claude Code
    Anthropic flipped the 1M token context window on for Opus 4.6 and Sonnet 4.6 in Claude Code. No beta header, no surcharge, flat pricing, and fewer compactions.
  • AGENTS.md vs CLAUDE.md Explained
    Two context files, one codebase. How AGENTS.md and CLAUDE.md differ, what each one does, and how to use both without duplicating anything.
  • Auto Dream
    Claude Code cleans up its own project notes between sessions. Stale entries get pruned, contradictions get resolved, topic files get reshuffled. Run /memory.
  • Auto Memory in Claude Code
    Auto memory lets Claude Code keep running project notes. Where the files sit, what gets written, how /memory toggles it, and when to pick it over CLAUDE.md.
  • Auto-Planning Strategies
    Auto Plan Mode uses --append-system-prompt to force Claude Code into a plan-first loop. File operations pause for approval before anything gets touched.
  • Autonomous Claude Code
    A unified stack for agents that ship features overnight. Threads give you the structure, Ralph loops give you the autonomy, verification keeps it honest.

More from Handbook

  • Agent Fundamentals
    Five ways to build specialist agents in Claude Code: Task sub-agents, .claude/agents YAML, custom slash commands, CLAUDE.md personas, and perspective prompts.
  • Agent Harness Engineering
    The harness is every layer around your AI agent except the model itself. Learn the five control levers, the constraint paradox, and why harness design determines agent performance more than the model does.
  • Agent Patterns
    Orchestrator, fan-out, validation chain, specialist routing, progressive refinement, and watchdog. Six orchestration shapes to wire Claude Code sub-agents with.
  • Agent Teams Best Practices
    Battle-tested patterns for Claude Code Agent Teams. Context-rich spawn prompts, right-sized tasks, file ownership, delegate mode, and v2.1.33-v2.1.45 fixes.

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

On this page

Table of Contents
Step 1: DNS turns a name into a number
Step 2: Your request is shattered into packets
Step 3: Each packet finds its own route
Step 4: It crosses under the ocean
Step 5: It travels as pulses of light
Step 6: A server answers
Step 7: Out of order, then rebuilt
All of it, every click
Frequently Asked Questions
What actually happens when you type a URL and press enter?
What is DNS in simple terms?
What is a packet?
Does the internet really run on undersea cables?
How is the internet so fast?
What is the difference between TCP and IP?

Stop configuring. Start building.

SaaS builder templates with AI orchestration.