Data gets sent over the internet by splitting it into small packets, routing each packet individually via a worldwide network of linked computers following shared addressing and transmission rules known as TCP/IP, then putting the packets back together into usable data at the end point.

It is a decentralized network of networks - tens of thousands of independent networks operated by ISPs, universities, governments, and corporations, all voluntarily interconnected and agreeing to exchange traffic using common standards.

There is no center, no single point of control, and no master switch. This architecture, originally designed with military resilience in mind, is what has allowed the internet to scale from four research computers in 1969 to connecting over 5.4 billion people today.

Dozens of discrete steps go into loading a web page, watching a video or sending an email: DNS lookups, TCP handshakes, routing packets across many networks, encryption and decryption as well as delivering content from servers that can be thousands of kilometers away. They all finish in fractions of a second.

Putting the pieces together like that turns the internet from a mysterious tool into a system of engineering decisions anyone can understand. Each decision has a purpose and comes with trade-offs.

When you type a URL into a browser, this article goes through step by step what happens next. It covers the main protocols and infrastructure that make it all run and gives you a simple model of the technology layers your data travels through each time you go online.

"The internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had."

Eric Schmidt, former CEO of Google (2003)

Key Definitions

Protocol: A set of rules that governs how data is formatted, transmitted, and received. Protocols allow devices from different manufacturers and running different software to communicate reliably. The internet depends on dozens of protocols working in concert.

IP address. Every device connected to a network receives a numerical label and IPv4 addresses consist of 32-bit numbers (such as 192.168.1.1) that give about 4.3 billion unique addresses.

IPv6 addresses are 128-bit (e.g., 2001:0db8:85a3::8a2e:0370:7334), providing approximately 340 undecillion addresses (3.4 x 10^38) - enough to assign a unique address to every atom on the surface of the Earth.

Packet. This is a small unit of data (most often 1,500 bytes or fewer for Ethernet networks). It contains the payload (the actual data), source and destination IP addresses as well as sequencing information. Data gets divided into packets so that several communications can use the same network links at once.

Router. This is a device that forwards packets between networks by looking at destination IP addresses and choosing the best next hop for each packet. The global internet holds millions of routers and each makes its own decision about where to forward traffic.

Latency. This measures the time delay from sending data to getting a response. It is measured in milliseconds and is a major factor in how well the internet performs, separate from bandwidth, which is the raw data transfer capacity of a connection measured in bits per second.


The Physical Infrastructure

Cables and Connections

Physical cables carry the internet mostly, not satellites or wireless signals. Fiber optic cables, thin strands of glass that transmit data as pulses of light, make up the backbone. Continents connect through submarine fiber optic cables that cross the ocean floors.

The TeleGeography Submarine Cable Map (updated annually) shows over 550 active or planned submarine cables as of 2024, carrying over 95% of all international internet traffic.

These cables are remarkable engineering achievements. A modern transatlantic cable like Amitie, completed in 2022 and jointly funded by Microsoft, Meta, Aqua Comms, and Vodafone, can carry about 400 terabits per second - enough to transmit the entire Library of Congress in a fraction of a second.

The cables themselves are roughly the diameter of a garden hose, armored against anchors and fishing trawls in shallow water and laid bare on the ocean floor in deep water.

They are vulnerable to natural disasters, ship anchors, and even shark bites - a problem serious enough that Google coats some of its submarine cables in Kevlar-like material.

Locally, the last mile link to homes and businesses comes in several forms: fiber optic (the fastest but also the most costly to install), coaxial cable (cable internet), copper telephone lines (DSL) or wireless radio links (fixed wireless, cellular LTE/5G).

For end users, the last mile can be the bottleneck that limits internet performance. About 24 million Americans still do not have access to broadband internet according to the Federal Communications Commission (FCC). The main reason is that the economics of last-mile infrastructure make it hard to build in rural areas.

Data Centers

Websites and internet services run on servers housed in data centers - large facilities filled with thousands of computers, with redundant power, cooling, and network connectivity. Major cloud providers (Amazon Web Services, Microsoft Azure, Google Cloud) operate data centers on every inhabited continent.

A single hyperscale data center facility may occupy over 100,000 square meters and consume 50 megawatts of electricity or more - as much as a small city.

Data centers worldwide were estimated by the International Energy Agency (IEA) in 2024 to consume about 1-1.5% of global electricity. That share is expected to rise markedly as artificial intelligence workloads expand. Cooling alone takes up around 40% of what these facilities consume.

LayerProtocol/TechnologyFunctionExample
ApplicationHTTP/HTTPS, DNS, SMTP, FTPUser-facing services and data formattingYour browser requesting a web page
TransportTCP, UDP, QUICReliable or fast delivery, packet sequencing, error checkingTCP ensures all packets arrive in order
InternetIP (IPv4, IPv6)Addressing and routing across networksIP address routes packet from New York to London
Network accessEthernet, Wi-Fi, fiber optic, 5GPhysical transmission of bits over a mediumWi-Fi radio signal from router to laptop

The Protocol Stack: TCP/IP

IP: Addressing and Routing

The Internet Protocol (IP) is the fundamental addressing scheme of the internet. Every device connected to the internet has an IP address. IP defines how packets are formatted with source and destination addresses, and how routers should forward them.

IP routing is stateless and hop-by-hop: each router on the path to the destination looks at the packet's destination IP address, consults its routing table, and forwards the packet to the next router that is closer to the destination.

Routers dynamically maintain routing tables using protocols like BGP (Border Gateway Protocol), which propagates reachability information across the internet's tens of thousands of independent networks, each called an Autonomous System (AS).

In 1989, Kirk Lougheed and Yakov Rekhter created BGP and it continues to be the glue that holds the internet's routing together even though it is famously said to be held together by "the good intentions of network operators."

IPv4, defined by Jon Postel in RFC 791 (1981), uses 32-bit addresses providing about 4.3 billion unique addresses - a number that seemed inexhaustible in 1981 but proved insufficient as the internet grew. The last blocks of IPv4 addresses were allocated by IANA in 2011.

IPv6, standardized in RFC 2460 (1998), gives an almost inexhaustible address space with 128-bit addresses. As of 2024, Google says that about 45% of connections to its services come via IPv6. That is up from 10% in 2016 and both protocols continue to coexist using various transition methods.

TCP: Reliable Delivery

Reliable packet delivery cannot depend solely on IP since packets can still get dropped, duplicated or arrive out of order. TCP (Transmission Control Protocol), which Vint Cerf and Bob Kahn defined in their 1974 founding paper and standardized in RFC 793 (1981), sits atop IP to give reliable, ordered delivery.

TCP runs through a three-way handshake before any data moves. The client sends a SYN packet to the server, the server replies with SYN-ACK and the client sends ACK. A connection is established that way. Numbered segments carry the data and the receiver acknowledges each segment as it comes.

If an acknowledgment is not received within a timeout period, the segment is retransmitted. The receiver reassembles segments in order, regardless of what order they arrived.

Slowing transmission when the receiver's buffer is full, as well as slowing transmission when the network gets congested (which is what packet loss or round-trip time increases show), are both handled by TCP through flow control and congestion control.

Developed by Van Jacobson in 1988 after a series of "congestion collapse" events came close to bringing the early internet to a stop, the original congestion control algorithm was created.

Google's BBR (Bottleneck Bandwidth and Round-trip propagation time) variant from 2016 and similar modern models tune TCP performance using richer models that give high reliability at the cost of extra latency and overhead compared to UDP.

UDP: Fast, Unreliable Delivery

UDP (User Datagram Protocol), defined in RFC 768 (1980), sends packets without establishing a connection, without acknowledgment, and without retransmission. What arrives, arrives; what is lost, is lost. This makes UDP faster and lower-latency than TCP, at the cost of reliability.

When real-time performance counts for more than perfect delivery, UDP works well for video calls, live streaming, online gaming and DNS queries. A frame lost during a video call is better than a frame that is delayed because a retransmission would arrive too late to help.

QUIC (Quick UDP Internet Connections), which was developed by Jim Roskind at Google and standardized by the IETF in RFC 9000 (2021), has HTTP/3 specified separately in RFC 9114 (2022). It runs over UDP but puts reliability and security at the application layer and gives TCP-like reliability along with lower latency.

By putting encryption directly into the transport protocol itself, QUIC gets rid of the separate TLS handshake and cuts the time needed for the first connection setup from two or three round trips (TCP plus TLS) down to one. As of 2023, QUIC was carrying a large share of global web traffic. Cloudflare said that more than 30% of its HTTP traffic was on HTTP/3.

For more on how algorithms manage data flows, see how algorithms work.


DNS: The Internet's Address Book

How DNS Resolution Works

Every time you visit a website, your browser first needs to know the IP address of the server hosting it. Domain names like "www.example.com" are human-readable but computers communicate via IP addresses. DNS (Domain Name System) resolution converts one to the other.

The system was designed by Paul Mockapetris in 1983 (RFC 882/883, superseded by RFC 1034/1035 in 1987) and remains one of the most critical infrastructure components of the internet.

The process involves a hierarchy of DNS servers:

  1. Your browser checks its local cache for a recent DNS lookup for this domain
  2. When not cached, your operating system turns to a DNS resolver, which most often means your ISP's DNS server or a public resolver you have set up, such as Google (8.8.8.8) or Cloudflare (1.1.1.1).
  3. The resolver checks its own cache
  4. If not cached, the resolver queries a root name server - one of 13 sets of servers (operated by organizations including ICANN, Verisign, NASA, and the U.S. Department of Defense) that know which name servers are authoritative for each top-level domain (.com, .org, .uk, etc.)
  5. The root server directs the resolver to the TLD (top-level domain) name server for .com
  6. The TLD name server directs the resolver to the authoritative name server for example.com
  7. The authoritative name server returns the IP address
  8. The resolver caches the result (respecting the TTL - Time to Live value set by the domain owner) and returns it to your browser

On the first lookup, this whole process takes 20 to 120 milliseconds. After that, each request uses the cache and resolves in less than 1 millisecond.

DNS Security

Designed in 1983 without security in mind, DNS continues to be a major attack vector. DNS spoofing, also known as cache poisoning, happens by putting false records into a resolver's cache that redirects users to malicious servers.

The Kaminsky Attack, discovered by security researcher Dan Kaminsky in 2008, demonstrated that virtually every DNS implementation was vulnerable to cache poisoning, prompting an emergency industry-wide patch effort.

DNSSEC (DNS Security Extensions), which employs cryptographic signatures to confirm the authenticity of DNS records, has seen slow uptake. As of 2024, only about 30% of top-level domains have been fully signed.

DDoS attacks targeting DNS infrastructure can make major websites appear unreachable. In October 2016, a massive DDoS attack against Dyn, a DNS service provider, made dozens of major websites including Twitter, Reddit, and Netflix unavailable to users in the US and Europe for several hours.

The attack was carried out using the Mirai botnet - a network of compromised IoT devices (security cameras, routers, DVRs) that generated traffic exceeding 1.2 Tbps.

For more on how these vulnerabilities are discovered and addressed, see how phishing attacks work.


What Happens When You Type a URL

The Complete Journey

Typing "" and pressing Enter triggers a precise sequence of steps:

1. DNS lookup. The browser resolves "www.example.com" to an IP address via the DNS process explained above. It takes less than 1ms if the cache is there and 20 to 120ms if it is not.

2. TCP connection. A TCP connection gets started by your browser to the server's IP address at port 443 that is the default port for HTTPS. The three-way SYN/SYN-ACK/ACK handshake takes place and that takes one round-trip time (RTT).

3. TLS handshake. A TLS handshake takes place for HTTPS. The browser and server agree on encryption algorithms, the server shows its digital certificate that proves its identity and was issued by a trusted Certificate Authority such as Let's Encrypt, DigiCert or Sectigo and they set up a shared encryption key.

With TLS 1.3 (standardized in RFC 8446, 2018), the handshake takes one round trip - down from two in TLS 1.2.

4. HTTP request. An HTTP GET request goes from the browser over the encrypted link as follows: "GET /article HTTP/2 Host: www.example.com." It contains headers that show what kind of browser it is, which content formats it accepts, cookies and other metadata.

5. Server processing. The request goes to the server, which then handles it by fetching from a database if the content is dynamic and running application code and builds a response. How long server-side processing takes ranges from less than 1ms for cached static files up to hundreds of milliseconds for complex database queries.

6. HTTP response. The server sends the response. It consists of a status code (200 OK means success), headers that tell what content type, how to cache it and what server sent it and the response body, which is HTML, JSON or some other content. This response gets divided into TCP segments and IP packets.

7. Packet routing. A packet moves from the server through its local network, to its ISP, over backbone networks that may span many autonomous systems and internet exchange points, to your ISP and then to your router and device.

Every router makes its own forwarding choice depending on the destination IP address. Tracing a route from New York to London most often takes 12 to 18 hops.

8. Browser rendering. Once your browser gets the packets and puts them back together, it parses the HTML and sends off more requests for any referenced resources, including CSS files, JavaScript, images and fonts.

Additional DNS lookups, TCP connections and HTTP requests can be triggered by these. A single modern web page can make 50 to 100 individual requests to load resources totaling several megabytes. According to the HTTP Archive, the median web page size passed the mark of 2.3 MB in 2024.

Over a fast connection, the total time from hitting Enter to seeing a rendered page on a performant website comes to 200 to 500 milliseconds. A poorly optimized site on a slow connection can take 5 to 10 seconds or more.


ISPs and Backbone Networks

The Network Hierarchy

The internet's physical network is organized in tiers. Tier 1 networks are the backbone providers - major telecommunications companies like AT&T, Lumen Technologies (formerly CenturyLink), NTT, Telia, and Cogent that operate the highest-capacity long-haul fiber networks.

Tier 1 networks peer with each other without payment (settlement-free peering) because the exchange of traffic is roughly equal and mutually beneficial. There are approximately 15-20 Tier 1 networks globally.

Tier 2 ISPs purchase transit capacity from Tier 1 providers while also peering with some networks. Tier 3 ISPs (the consumer ISPs most people use) typically purchase transit from Tier 2 providers and provide the last-mile connection to homes and businesses.

Peering and Internet Exchange Points

Rather than routing all traffic through paid transit, many networks choose to interconnect directly at Internet Exchange Points (IXPs) - neutral facilities where multiple networks physically connect their equipment and exchange traffic at low cost.

Amsterdam's AMS-IX and London's LINX are among the world's largest IXPs, each handling peak traffic exceeding 10 terabits per second. Frankfurt's DE-CIX is the world's largest by peak traffic volume.

When Netflix peers directly with a major ISP, Netflix content goes straight from Netflix's servers to the ISP's network without going through any intermediate networks. That cuts Netflix's transit costs and gives better streaming quality to customers of the ISP.

Netflix's Open Connect program places dedicated caching servers inside ISP networks, serving over 95% of Netflix traffic from within the viewer's own ISP network.


Content Delivery Networks (CDNs)

Why CDNs Transform Web Performance

Hard limits on internet latency come from the speed of light. A server in California sending data to a user in Berlin covers about 9,000 km.

At the speed of light through fiber (about 200,000 km/s due to the refractive index of glass), this one-way trip takes a minimum of 45 milliseconds. A round trip is at minimum 90ms, before any processing time.

CDNs (Content Delivery Networks). By putting content geographically close to users, CDNs address this problem. When a user in Berlin asks for a video from a CDN node in Frankfurt, the latency is 5 to 10ms instead of 90ms. Static assets get served directly from the CDN node as cache hits with no request ever going to the origin server.

Cloudflare operates servers in over 310 cities across 120 countries. Akamai, the pioneer of CDN technology founded in 1998 by MIT mathematician Tom Leighton and graduate student Danny Lewin, has over 350,000 servers in 135 countries.

When a CDN is configured for a website, most of its static content (images, CSS, JavaScript, video files) is served from whichever CDN node is geographically closest to the requesting user.

CDN use is on a massive scale. Akamai alone handles 15-30% of global web traffic. When major streaming events happen, how much CDN capacity there is makes the difference between users having a smooth experience and the site crashing.

CDN Caching and Cache Invalidation

Based on HTTP headers that the origin server sets, CDNs store content. A Cache-Control: max-age=31536000 header makes the CDN cache the content for one year. The CDN has to be told explicitly to invalidate (purge) the cached version when origin content changes or else users will keep getting old content.

Cache invalidation strategy is one of the more complex aspects of web performance engineering.

It is famously described in a quote attributed to Phil Karlton: "There are only two hard things in Computer Science: cache invalidation and naming things." Modern solutions include content-addressed URLs (where the filename includes a hash of the content, so any change automatically creates a new URL) and stale-while-revalidate strategies that serve cached content immediately while fetching fresh content in the background.


Practical Takeaways

Understanding DNS makes troubleshooting easier. Lots of what looks like an internet outage is actually a DNS failure where the server is there but its name cannot be found. By switching to a dependable public DNS resolver such as Cloudflare (1.1.1.1) or Google (8.8.8.8), many such problems are solved right away.

HTTPS is not optional for any legitimate website. Data in transit gets exposed to anyone watching the network through plain HTTP, which includes public Wi-Fi. Look for the padlock icon and "https://" before putting in any sensitive information. Over 95% of Chrome page loads as of 2024, Google's Transparency Report says, now use HTTPS.

CDNs account for a majority of global internet traffic. How they work explains why a website hosted on a server in one country can load quickly everywhere around the world and why cache clearing is sometimes necessary following a site update.

Your ISP is a major bottleneck. Home internet performance depends most often on the quality, reliability and bandwidth of the last-mile link that your ISP provides, no matter how fast the backbone networks are. That is why fiber-to-the-home connections keep beating cable and DSL in both speed and latency.

IPv6 adoption is necessary and inevitable. There are no more IPv4 addresses left. IPv6 is what the internet will use to address devices long term. Network engineers and anyone working on infrastructure planning need to understand IPv6 more and more as time goes on.


Sources & Further Reading

  1. Cerf, V., & Kahn, R. (1974). A Protocol for Packet Network Intercommunication. IEEE Transactions on Communications, 22(5), 637-648. View source
  2. Berners-Lee, T. (1989). Information Management: A Proposal. CERN. View source
  3. Mockapetris, P. (1987). Domain Names - Implementation and Specification. RFC 1035. IETF. View source
  4. Postel, J. (1981). Transmission Control Protocol. RFC 793. IETF. View source
  5. Iyengar, J., & Thomson, M. (2021). QUIC: A UDP-Based Multiplexed and Secure Transport. RFC 9000. IETF. View source
  6. TeleGeography. (2024). Submarine Cable Map. PriMetrica Inc.
  7. Cloudflare. (2024). How the Internet Works - Learning Center.
  8. IETF. (2018). The Transport Layer Security (TLS) Protocol Version 1.3. RFC 8446. View source
  9. HTTP Archive. (2024). State of the Web Report.View source
  10. Akamai Technologies. (2024). State of the Internet Connectivity Report.
  11. International Energy Agency. (2024). Electricity 2024: Data Centres and AI.View source
  12. Google. (2024). IPv6 Adoption Statistics.