How the Internet Routes Data Packets Across the World
The internet routes data via TCP/IP packet switching and BGP. Learn how autonomous systems, submarine cables, CDNs, and latency physics shape every online interaction.
A Message That Crosses an Ocean in 70 Milliseconds
When you click a link, your browser sends a request that may travel from your home in Chicago to a server in London—crossing submarine fiber-optic cables under the Atlantic Ocean—and receive a response in under 70 milliseconds. During that time, your data is broken into dozens of packets, each making independent routing decisions through dozens of routers operated by multiple competing companies, reassembled in the correct order at the destination, and delivered intact despite the internet having no central authority, no guaranteed paths, and billions of simultaneous users. That this works reliably, continuously, and at scale is one of the most remarkable engineering achievements of the 20th century—and understanding why requires looking at its foundational design choices.
Packet Switching: Dividing and Conquering
The internet's foundational architecture is packet switching, conceptually developed by Paul Baran at RAND Corporation (1964) and Donald Davies at the UK National Physical Laboratory (1965) independently, and implemented in ARPANET beginning in 1969.
Instead of establishing a dedicated circuit between sender and receiver (as traditional telephone networks did), packet switching breaks all data into small chunks called packets—typically 1,500 bytes for Ethernet frames, the practical maximum transmission unit (MTU) on most networks. Each packet contains:
- A header with source IP address, destination IP address, packet sequence number, time-to-live (TTL) value, and protocol information
- A payload of actual data (up to ~1,460 bytes for TCP)
- A checksum for error detection
Each packet finds its own way through the network independently. They may travel via different routes and arrive out of order; the receiving system reassembles them using sequence numbers. This approach makes networks resilient: if a router or link fails, packets simply route around the failure. No single point of failure can bring down the whole system.
TCP/IP: The Protocol Stack
The Internet Protocol (IP) handles addressing and routing—getting packets from source to destination. The Transmission Control Protocol (TCP) handles reliability—ensuring all packets arrive, in order, with error correction. Together they form TCP/IP, formalized by Vint Cerf and Bob Kahn in their landmark 1974 paper "A Protocol for Packet Network Interconnection."
| Layer (TCP/IP Model) | Protocol Examples | Function |
|---|---|---|
| Application | HTTP/HTTPS, DNS, SMTP, FTP | User-facing data and services |
| Transport | TCP, UDP | Reliability, ordering, flow control (TCP); speed, low overhead (UDP) |
| Internet | IPv4, IPv6, ICMP | Addressing, routing, fragmentation |
| Network Access | Ethernet, Wi-Fi (802.11), fiber | Physical transmission between adjacent nodes |
IPv4, using 32-bit addresses, provides approximately 4.3 billion unique addresses—a number that seemed vast in 1981 and proved dangerously insufficient by the 2010s. IPv6, using 128-bit addresses, provides 3.4 × 1038 addresses—enough to assign a unique address to every atom on Earth's surface and still have capacity remaining. IPv6 deployment has accelerated but coexists with IPv4 through transition mechanisms.
BGP: The Protocol That Holds the Internet Together
Individual routers on the internet don't have a complete map of all possible paths to all destinations—the internet is too large and dynamic for that. Instead, the internet is divided into Autonomous Systems (ASes): independently administered networks identified by unique AS numbers. Your ISP is an AS. Google is an AS. Amazon Web Services is an AS. As of 2024, approximately 80,000–90,000 active AS numbers exist.
The Border Gateway Protocol (BGP), defined in RFC 1771 (1995) and updated in RFC 4271 (2006), is the routing protocol that ASes use to exchange reachability information with each other. BGP is a path vector protocol: each AS advertises which IP address ranges it can reach, and through which path of AS numbers. Routers maintain BGP tables listing all known prefixes and their paths; they select the best path based on a complex set of attributes including AS path length, local preference, and business relationships (traffic engineering).
BGP is notoriously complex and has been the source of major internet disruptions:
- In 2010, China Telecom accidentally (or deliberately—the cause is disputed) announced routes for 37,000 IP prefixes belonging to thousands of companies, briefly routing significant portions of global internet traffic through China.
- In 2021, a BGP configuration error at Facebook's AS caused its name servers to disappear from the global routing table, making Facebook, Instagram, and WhatsApp unreachable worldwide for approximately 6 hours.
Physical Infrastructure: Submarine Cables and the Speed of Light
The internet's backbone is physical—predominantly fiber-optic cables that transmit data as pulses of light. As of 2024, over 400 submarine cable systems totaling more than 1.3 million kilometers are active on the ocean floor, carrying roughly 99% of international internet traffic. Satellites carry less than 1% of international data despite their visibility in the public imagination.
Latency—the delay between sending and receiving data—is ultimately bounded by physics. Light travels through fiber optic cable at approximately two-thirds the speed of light in vacuum:
- New York to London (fiber distance ~6,300 km): minimum theoretical latency ~31 ms each way; actual round-trip typically 65–80 ms
- Los Angeles to Tokyo (fiber distance ~9,000 km): minimum theoretical ~45 ms each way; actual round-trip ~110–130 ms
- London to Sydney (fiber distance ~22,000 km): minimum theoretical ~110 ms each way; actual round-trip ~250–280 ms
Low-earth orbit satellite internet (SpaceX Starlink, Amazon Kuiper) achieves latencies of 20–60 ms by eliminating long ground-cable distances, at the cost of significant infrastructure complexity and per-user capacity constraints.
Content Delivery Networks: Bringing Data Closer
For latency-sensitive content, the most effective solution is geographic proximity—serving data from servers physically close to users. Content Delivery Networks (CDNs) maintain caches of popular content in hundreds of "points of presence" (PoPs) distributed globally. Cloudflare operates over 310 network locations in more than 120 countries. Akamai's network delivers 15–30% of all web traffic globally. Netflix uses its own Open Connect CDN appliances installed inside ISP networks to serve the majority of its streaming traffic entirely within the user's local internet provider.
CDNs reduce latency and backbone congestion simultaneously. A user in São Paulo streaming Netflix no longer requires a packet to travel to a data center in Virginia; the content is cached at a local PoP and served with 10–20 ms latency instead of 100+ ms. Approximately 72% of all internet traffic is now delivered via CDNs, according to Sandvine's 2023 Global Internet Phenomena Report.
The internet's architecture was designed to be decentralized and resilient—no central controller, no single path, no single point of failure. That founding philosophy, established in ARPAnet's 1969 design and encoded in TCP/IP, still governs a network that now connects approximately 5.4 billion people.
Related Articles
software
APIs Explained: How Software Systems Talk to Each Other
Learn what APIs are, how REST, GraphQL, and gRPC work, key concepts like authentication, rate limiting, and versioning, and why APIs are the internet's building blocks.
9 min read
software
How Chess Engines Outthink Human Grandmasters at Every Level
Stockfish evaluates millions of positions per second using minimax and alpha-beta pruning. AlphaZero learned from scratch with neural networks. Here's how engines surpass human play.
9 min read
software
How Electric Vehicles Differ From Combustion Engines in Efficiency, Cost, and Impact
EVs convert 85–90% of battery energy to motion vs. 20–40% for combustion engines. Battery chemistry, regenerative braking, charging networks, and lifecycle emissions comparisons reveal the full picture.
9 min read
software
How Lithium-Ion Batteries Store and Release Energy
Lithium-ion batteries power everything from phones to electric vehicles through lithium intercalation chemistry. Explore NMC vs LFP tradeoffs, degradation, thermal runaway, and recycling challenges.
9 min read