Skip to content

Computer Networks: Why Latency, Not Bandwidth, Rules

The network between you and a web server is unreliable on purpose, and the number that decides how fast anything feels is not on your internet bill. It is the number of round trips, multiplied by the speed of light.

12 min readReadInteractive

You type a web address and press enter. A fraction of a second later a page has arrived from a machine you have never seen, perhaps on another continent, through dozens of devices owned by companies that don't know each other. No one planned your route. If a cable on the way fails, the page still comes. It rarely arrives scrambled, and it never asks you which wires to use.

One thing about this is stranger than it looks: the network is unreliable on purpose. Individual packets get lost, duplicated and delayed all the time. Reliability is rebuilt on top, at the two ends, out of cheap, dumb parts in the middle. Once you see how, the number that governs everything you feel as "speed" turns out not to be the one on your internet bill.

The course in one box

Who takes it: computer science and computer engineering students, usually in the third year.

What it's for: understanding how independent machines exchange data across an unreliable, shared, planet-sized network.

Comes after: Operating Systems (34/26), because sockets, buffers and timers are all kernel services.

Leads to: Computer Security (34/33), which is mostly about attacking and defending what this subject builds. Databases (34/28) meets the same problems when data is spread over many machines.

Honest line: you won't be able to configure a carrier router after this piece. You will see why a call to Sydney has a delay no money can remove, and what really happens in the 0.2 seconds before a page appears. The Internet (29/04) tells the history; this piece explains the mechanisms.

Packets, not circuits

The old telephone network used circuit switching: a call reserved a path, and the capacity on it stayed yours, used or not. The internet uses packet switching: chop every message into small pieces, label each with its destination, and let them share links first come, first served. Silence costs nothing, because there are no reserved slots to waste.

Traffic from people is bursty, so sharing wins. The classic example: a 1 Mbps link, users who each need 100 kbps while active, and each active only 10% of the time. Circuits can serve exactly 10 users. Packets can serve far more, because they are seldom all active at once. The chance that more than 10 of N users are active at the same moment is a binomial tail.

Interactive · Sharing a link
Number of users sharing the link
Each user is active

At 35 users and 10% activity, the chance that more than 10 want to send at once is about 0.04%: 4 times in 10,000 moments. Packet switching has served 3.5 times as many users and almost never makes anyone wait. Push the activity to 20% and the overload chance jumps to about 7%: the price of sharing is occasional queues, and when a queue overflows, packets are simply dropped. Hold that thought; congestion control exists because of it.

Layers: each one trusts the one below

No one program does all this. The work is split into layers, each with one job and each hiding the layer below. The common four-layer picture goes like this. The link layer (Ethernet, Wi-Fi) moves a frame across one hop. The network layer (IP) carries a packet host to host across many hops, with no promises. The transport layer (TCP or UDP) connects one program to another using port numbers, and TCP adds reliability. The application layer (HTTP, DNS, email) is what programs actually say. The seven-layer OSI model is the textbook's finer version of the same idea.

Layers cooperate by encapsulation: each wraps what it receives from above in its own header, like envelopes inside envelopes. The rule that justifies this design is the end-to-end principle (Saltzer, Reed and Clark, 1984): put the smart functions at the ends, because only the ends know what "correct" means.

Interactive · Wrap a message
Message size

Ethernet 14 bytes + IPv4 20 + TCP 20 (no options) = 54 bytes of headers per packet; the largest TCP payload in an ordinary 1,500-byte Ethernet packet is 1,460 bytes. Trailers, preamble and gaps are ignored.

A single keystroke, one byte, travels as 55 bytes, so only 1.8% of what is sent is yours. A big transfer approaches 96.4%, since each 1,460 bytes of payload carries 54 of headers. Layers cost a little and buy an enormous amount: Wi-Fi can be swapped for fibre under TCP without TCP noticing.

Names and addresses: IP and DNS

Every interface on the internet has an IP address: 32 bits in IPv4 (4,294,967,296 possible), written as four numbers, and 128 bits in IPv6. The address has two parts: a network prefix and a host number within it. A suffix like /26 says the first 26 bits are the network. Everything with the same prefix is "on the same network" and reachable directly; anything else is sent to a router. IANA handed out the last free IPv4 blocks to the regional registries on 3 February 2011, which is why IPv6 exists and why many networks share one address through address translation.

Interactive · Which network is this?
Prefix length

With the defaults, 192.168.1.130/26 sits in the network 192.168.1.128 to 192.168.1.191, with 62 usable hosts. 192.168.1.200 is outside it, so your computer would send that traffic to its router instead of straight to the machine.

People don't remember numbers, so the Domain Name System (DNS) translates names to addresses. It is a distributed, cached database arranged as a tree. To find www.example.com, a resolver asks a root server where the .com servers are, asks those where example.com's own servers are, and asks them for the answer, then caches it for the time the owner allows (the TTL). The root has 13 named identities (A to M) run by 12 organisations; as of 1 November 2026 root-servers.org counted 2,049 operational instances of them spread around the world.

Routing: each router only knows the next hop

A router does not know the path to anywhere. It holds a forwarding table of prefixes and the next hop for each, and for every packet it finds the entry that matches the destination. If several match, the longest prefix wins, since it is the most specific. Routers across the internet learn the table from each other: inside a network with protocols such as OSPF, and between the roughly tens of thousands of independent networks (autonomous systems) with BGP, which spreads "I can reach this prefix" announcements.

Interactive · Longest prefix wins

Routing is fragile in a way worth knowing. On 4 October 2021, Facebook, Instagram and WhatsApp vanished for about six hours. By Meta's own account, a command run during routine maintenance accidentally took down its backbone connections; its DNS servers, built to withdraw their BGP announcements when they cannot reach the data centres, then withdrew them, so the rest of the internet no longer had a route to Meta's name servers. Nothing was hacked. The network did what it was told.

TCP: a reliable pipe built from an unreliable network

IP just tries its best. TCP turns that into a dependable stream of bytes. It opens with a three-way handshake (SYN, SYN-ACK, ACK), numbers every byte, has the receiver acknowledge what arrived, and resends what is not acknowledged in time. It also holds back so as not to drown the receiver (flow control) and, more subtly, so as not to drown the network (congestion control). The need for the second was discovered the hard way: in October 1986 the throughput on a path between Lawrence Berkeley Laboratory and UC Berkeley, about 400 yards apart, fell from 32 kbit/s to 40 bit/s. Van Jacobson's "Congestion Avoidance and Control" (1988) is the repair that every TCP since has built on.

The idea: the sender keeps a congestion window (cwnd), the number of packets allowed in flight. It starts small and doubles every round trip (slow start; the initial window of 10 packets is allowed by RFC 6928). Once it finds the limit, it grows by one packet per round trip and, on a loss, halves its window. This is additive increase, multiplicative decrease (AIMD), and the window traces a sawtooth.

Interactive · The TCP sawtooth
Packets the path can hold

Idealised: no buffer, synchronised losses, one round per step. Blue = flow 1, orange = flow 2, dashed = capacity.

One flow settles into a sawtooth between roughly half the capacity and full, averaging roughly three-quarters to four-fifths of it. Add a second flow and the two converge to the same share, though one started far behind. That is why AIMD is fair without anyone coordinating: the bigger flow loses more on each halving, and both gain equally on each increase. Modern stacks use refinements (Linux defaults to CUBIC; Google's BBR estimates bandwidth and delay instead of waiting for loss), but they all answer the same question: how fast is it safe to go? UDP is the opposite choice: no reliability, no waiting, which suits video calls and games that prefer a late packet dropped to an old one resent.

Latency versus bandwidth: you can't beat the speed of light

Bandwidth is how many bits per second a link can carry. Latency is how long one bit takes to get there. A highway analogy: bandwidth is the number of lanes, latency is the length of the road at the speed limit. Lanes can be added; the speed limit is physics. Light in vacuum covers 299,792 km every second; in glass fibre, with a refractive index of about 1.47, only about 204,000 km/s.

round-trip time ≥ 2 × distance ÷ signal speed
Interactive · The speed-of-light floor
One-way path length
Link bandwidth
Page or file size

New York to London is about 5,570 km along the great circle. Light in fibre needs 27 ms each way, a round-trip floor of about 55 ms; in practice a cable that is not a straight line adds more. Hibernia Express, built to be fast, reported a tested round trip of under 58.95 ms between data centres in New Jersey and Slough. London to Sydney is a floor of about 167 ms. A satellite in geostationary orbit, 35,786 km up, makes a request-and-reply cover about 143,000 km: at least 477 ms, and measured median latency for such services in early 2025 was around 680 ms. Low-orbit constellations fly about 550 km up, which is why Starlink reports a median near 25 ms (SpaceX, June 2025) and Ookla measured about 45 ms for US users in early 2025.

The practical rule: a transfer takes about one round trip plus size divided by bandwidth. For a 100 KB page on a 100 Mbps link with a 50 ms round trip, the transfer itself takes 8 ms and the round trip 50 ms, so 86% of the wait is latency, and more bandwidth hardly helps. Also, a sender can only have a bandwidth-delay product of data in flight: a 1 Gbps path with 50 ms of round trip holds 6.25 MB, and a sender limited to a 64 KiB window on it moves just 10.5 Mbps.

A page load, round trip by round trip

Here is what happens when you open a secure web page. The browser checks its caches. If it has no address for the name, it asks DNS. It opens a TCP connection (one round trip for the handshake). It runs a TLS handshake, in which the two ends agree on secret keys using public-key cryptography, and the server proves its identity with a certificate signed by an authority your device trusts. After that all traffic is encrypted and tamper-evident. Only then does it send the HTTP request, "GET /", and wait one more round trip for the first byte. The browser parses the HTML, finds more files (style sheets, scripts, images) and fetches them, often from a nearby content delivery network precisely to shorten the round trips.

TLS 1.2 needed two round trips to set up; TLS 1.3 (RFC 8446, August 2018) needs one, and can sometimes send data in zero for a returning visitor, at some cost to replay protection. HTTP/3 (RFC 9114, June 2022) runs over QUIC, which runs over UDP and folds the transport and encryption handshakes into one. The padlock means the channel to that domain is private; it does not say the site is trustworthy. Computer Security (34/33) takes up the rest.

Interactive · Round trips before the first byte
Round-trip time to the server

Idealised: DNS counted as one 20 ms trip to your resolver, no server think time, no packet loss. "Returning visitor" means TLS session resumption (0-RTT where the protocol allows it).

At 100 ms, the old stack (TCP plus TLS 1.2) needs 4 round trips, 400 ms, before the first byte, plus DNS. TLS 1.3 takes 3, QUIC takes 2, and a returning QUIC visitor takes 1. The server's speed never appears in these numbers: the wait is geography. That is why every large site puts copies of its content near you.

What a graduate just sees

  • The network is deliberately unreliable and dumb; reliability lives at the ends.
  • Packet switching wins because traffic is bursty, and its cost is occasional queues and drops.
  • Each layer wraps the one above with a header, and each header costs bytes.
  • A prefix says who is local; a router forwards on the longest matching prefix, one hop at a time.
  • Names are looked up through a cached tree, which is why changing DNS records takes time to spread.
  • Latency, not bandwidth, usually decides how fast something feels, and its floor is the speed of light.
  • Congestion control is a sawtooth: probe for more, halve on loss.
  • Every setup handshake is a round trip, so fewer handshakes make a page faster.

Where it shows up next

  • Computer Security (34/33): TLS, certificates, DNS spoofing, BGP hijacks and denial-of-service floods are attacks on exactly the layers described here.
  • Operating Systems (34/26), looking back: a socket is a file-like handle, and every packet arrival is an interrupt the kernel must schedule.
  • Databases (34/28): replicating data between continents runs into the latency floor here, which is why distributed databases have to choose between speed and consistency.
  • Real jobs: network engineers, site-reliability engineers, anyone tuning a web site's load time, and anyone building video calls, games or trading systems where milliseconds matter.

If you want to go deeper

  • 📘 Textbook: James Kurose and Keith Ross, Computer Networking: A Top-Down Approach (9th ed.). The most widely assigned text; starts with the web and works down the layers.
  • 📘 Textbook: Larry Peterson and Bruce Davie, Computer Networks: A Systems Approach (6th ed.), readable free online at book.systemsapproach.org. Best on how the pieces fit together.
  • 📘 Gentler and free: Ilya Grigorik, High Performance Browser Networking. Latency, TCP, TLS and HTTP/2 explained for people who build web pages.
  • 🌐 Free course: Stanford CS 144, Introduction to Computer Networking: lecture notes, slides, congestion-control videos and the labs in which students write their own TCP.
The takeaway

The internet is a pile of simple parts: unreliable packets, layered headers, prefixes and next hops. Reliability, fairness and security are added at the ends. How fast it feels depends mostly on the number of round trips multiplied by the speed of light, so reducing handshakes beats buying bandwidth.

Try this: run ping to a site on another continent and note the time. Then divide the distance in km by 100: that is the round-trip floor in milliseconds through fibre. See how close the real figure comes.

Sources & Further Reading

Sources. Statistical-multiplexing example (1 Mbps link, 100 kbps users, 10% activity, 35 users): Kurose and Ross; exact binomial tail computed here (0.042%). IANA IPv4 depletion (3 February 2011): ARIN. Root servers: root-servers.org (13 identities, 12 organisations, 2,049 instances as of 1 November 2026). Facebook outage of 4 October 2021: Meta Engineering, "More details about the Oct. 4 Facebook outage". Congestion collapse of October 1986 (32 kbit/s to 40 bit/s): Jacobson, "Congestion Avoidance and Control", SIGCOMM 1988. RFC 6928 (initial window of 10, April 2013); RFC 8446 (TLS 1.3, August 2018); RFC 9114 (HTTP/3 over QUIC, June 2022). End-to-end arguments: Saltzer, Reed and Clark, ACM TOCS 2(4), 1984. Hibernia Express round trip under 58.95 ms: Equinix and Hibernia Networks announcements (2015). Satellite figures: Ookla, Q1 2025 (GEO medians about 680 ms; Starlink US about 45 ms) and SpaceX, June 2025 (25.7 ms median peak-hour, US). Distances: great-circle (haversine) calculations, fibre index 1.47. Every number in the simulators was computed in code.