βΆWatch a request happen
A single page load, played out across a small island. Drag to pan, rotate the view with the arrow buttons, and switch scenarios to see what happens when things go wrong.
Loading⦠Starting the simulation.
Keyboard: focus the map, then use β β to rotate, + β to zoom and space to pause. The clock is slowed down enormously β in reality the whole journey takes a few hundred milliseconds.
01The internet is a network of networks
There is no single machine called "the internet", and nobody owns it. What exists is roughly seventy-five thousand independent networks β universities, phone companies, hosting providers, governments, cloud platforms β that have each agreed to carry one another's traffic. Each of those networks is called an autonomous system.
Your home network is a tiny one, attached to your internet service provider's much bigger one. Their network connects to others, often at a shared building called an internet exchange point, where hundreds of networks plug into a common switch and swap traffic. The internet is the sum of those agreements.
The one idea to keep
The network makes no promises. It will do its best to move a parcel of data towards its destination, and that is all. Everything that feels reliable β a video that does not stutter, a payment that does not go through twice β is built on top of an unreliable network by software at the two ends.
02Addresses, names, and the phone book
Every device reachable on the internet has an IP address: a number that
identifies where it is on the network. IPv4 addresses look like 93.184.216.34
and there are about four billion of them, which ran out years ago. IPv6 addresses look
like 2606:2800:220:1:248:1893:25c8:1946 and there are enough for every grain
of sand to have several trillion.
People are bad at remembering numbers, so we use names. The Domain Name System
translates between them. When you ask for example.com, your device asks a
resolver β usually run by your ISP or a public service β which walks down a
hierarchy: the root servers know who runs .com, the .com servers
know who runs example.com, and that final authoritative server knows
the actual address.
| Question | Asked of | Answer |
|---|---|---|
| Where is example.com? | Your resolver | Let me find out⦠|
| Who handles .com? | A root server | These thirteen servers do |
| Who handles example.com? | A .com server | This name server does |
| What is example.com's address? | That name server | 93.184.216.34 |
Every answer comes with a time-to-live, so the resolver can remember it. That is why the first visit to a site feels slightly slower than the second: the phone book lookup only happens once.
03Everything travels as packets
Data is never sent as one continuous stream down a wire. It is chopped into packets β typically around 1,500 bytes each β and every packet travels independently. A photo might be five hundred packets; they may take different routes and arrive out of order.
Each packet is an envelope inside an envelope:
Link header
Which machine on this cable or Wi-Fi network to hand it to next. Rewritten at every hop.
IP header
The source and destination addresses. Survives the whole journey unchanged.
TCP/UDP header
Port numbers, sequence numbers β which application, and where this piece fits.
Payload
The actual bytes you care about: a fragment of HTML, a slice of video, part of a key exchange.
This is why the internet scales. Nothing reserves a private line between you and a server. Packets from millions of unrelated conversations are interleaved on the same fibres, each one handled on its own merits and forgotten immediately afterwards.
04Routing: nobody knows the whole way
No device on the internet knows the full path to your destination. A router only knows one thing: given this destination address, which neighbour should I hand it to? It makes that decision in microseconds and moves on. The path emerges from thousands of such local decisions, like water finding its way downhill.
Routers learn from each other using the Border Gateway Protocol, in which networks announce which addresses they can reach and how. It is a system built largely on trust, which is why a mistaken announcement in one country can occasionally pull a service offline on the other side of the planet.
Each line is one hop, and the numbers are round-trip times. Notice how little time the last few hops add β and how much a hop across an ocean would.
05TCP: making an unreliable network feel reliable
Since packets can be lost, duplicated or reordered, something has to clean up. That something is TCP, running on your device and on the server β not in the network in between.
- The handshake. Your device sends
SYN, the server repliesSYN-ACK, your device confirms withACK. Now both sides agree a conversation exists. - Numbering. Every byte gets a sequence number, so the receiver can reassemble the stream in the right order.
- Acknowledgement. The receiver says what it has. Anything not acknowledged in time gets sent again.
- Congestion control. Senders start slow, speed up while things go well, and back off sharply at the first sign of loss.
Why the internet does not collapse
That last point is quietly extraordinary. Bandwidth is shared, and no central authority allocates it. It works because virtually every device voluntarily slows down when it detects congestion. Politeness, implemented in software, is what keeps the shared road moving.
Not everything wants this. Video calls and games often use UDP, which has no handshake and no retransmission: for live media, a late packet is worse than a missing one. Modern web traffic increasingly uses QUIC, which rebuilds TCP's reliability on top of UDP and folds the encryption handshake into the same round trip.
06HTTPS: the padlock, explained
Packets pass through equipment owned by strangers. TLS β the S in HTTPS β makes that acceptable by doing three things at once:
Identity
The server presents a certificate signed by an authority your device already trusts, proving it is who the name says.
Secrecy
Both sides derive a shared key that no eavesdropper can compute, and encrypt everything that follows.
Integrity
Any tampering en route is detected, because modified data fails its authentication check.
What is not hidden: the fact that you contacted that server at all. Addresses have to stay readable, or routers could not do their job. Encryption protects the contents of the envelope, not the fact that an envelope was sent.
07HTTP: asking for the actual page
After all that setup, the request itself is almost anticlimactic β a short block of text naming a method, a path, and some headers. The response is a status code, more headers, and the content.
One page is never one request. The HTML comes back first, and the browser reads it to discover the stylesheets, fonts, scripts and images it also needs β then repeats the whole process for each of them, dozens of times over, in parallel. A typical page today pulls in something like seventy separate resources from a handful of different companies.
08Caches: the trick that makes it feel fast
Physics sets a floor on speed. Light in fibre travels about 200,000 km per second, so a round trip from Amsterdam to Sydney cannot beat roughly 160 milliseconds no matter how much you spend. The only real fix is to not make the trip.
So the web is layered with copies. Your browser keeps recently used files on disk. Your operating system remembers DNS answers. And content delivery networks place thousands of caching servers inside ISPs around the world, each holding copies of popular content. When you request a page, you usually reach one of those β tens of kilometres away instead of thousands.
Try it in the simulation
Run "Full journey (cache miss)" and then "Second visit (cache hit)". Same page, same bytes, but the second run never crosses the ocean. Fewer hops means less waiting, less equipment doing work, and less electricity spent on the same result.
09Underneath it all: glass, copper and radio
The internet is often described as a cloud, which is almost exactly wrong. It is one of the heaviest pieces of infrastructure humanity has built.
- The last metres are radio: Wi-Fi in your home, or a mobile network's masts, converting your data into modulated electromagnetic waves.
- The last kilometres are copper or fibre running under your street to a local exchange.
- The backbone is optical fibre β hair-thin strands of glass carrying laser pulses, bundled along railways and motorways.
- Between continents run around 600 subsea cables, roughly the diameter of a garden hose, laid across the sea floor. They carry over 95% of intercontinental traffic. Satellites carry a small remainder, plus growing low-orbit constellations for places cable cannot reach.
- At the ends sit data centres: warehouses of servers, with the power and cooling to keep them running.
When a fishing anchor damages a cable off the coast of Egypt, latency changes in India. The abstraction is thinner than it looks.
10What all of this costs
Every hop in the simulation is a real machine drawing real power. Data centres and data transmission networks together account for roughly 1β1.5% of global electricity use β each broadly comparable to the aviation industry's share of emissions, and growing as demand grows.
The useful mental model is that energy is spent in three places: the device in your hands, the network moving the bytes, and the servers producing them. Design decisions move work between those three, and the greenest request is still the one that never has to be made.
Send less
Compression, right-sized images and fewer third-party scripts cut work at every hop simultaneously.
Send it less far
Caching at the edge removes entire ocean crossings from the picture.
Send it at a better time or place
The carbon intensity of electricity varies by hour and by region; shifting flexible work follows the clean power.
If you want the formal version of that accounting, the Green Software Foundation's Software Carbon Intensity specification defines how to calculate it properly.
β³Glossary
| Term | In one line |
|---|---|
| IP address | The number identifying a device's location on the network. |
| DNS | The system that turns names into IP addresses. |
| Packet | A small, independently routed chunk of data with addressing headers attached. |
| Router | A machine that decides which neighbour to forward each packet to. |
| ISP | The company connecting your network to the rest of the internet. |
| IXP | A shared facility where many networks interconnect and exchange traffic. |
| TCP | The protocol that turns lossy packet delivery into an ordered, reliable stream. |
| UDP | Fire-and-forget delivery, preferred when timeliness beats completeness. |
| TLS / HTTPS | Encryption and server identity checks layered under HTTP. |
| CDN | A distributed set of caches holding copies of content close to users. |
| Latency | How long a round trip takes; bounded by distance and by queueing. |
| Bandwidth | How much data a link can carry per second; shared between everyone using it. |
βGo deeper
- Submarine Cable Map β every subsea cable on earth, drawn to scale.
- How DNS Works β the name system as a comic.
- High Performance Browser Networking β Ilya Grigorik's book, free online.
- The Internet explained from first principles β long, rigorous, excellent.
- Cloudflare Learning Center β short reference articles on almost every term above.