Core CS · Computer Networks
Ten milliseconds that no amount of bandwidth will buy back
Bandwidth, throughput and latency are three separate measurements that students collapse into the word “speed” and interviewers pull apart in one question. Push a single 1500-byte packet from Delhi to Chennai with the units written down at every step, and the four delays stop being a list you memorised.
Set the packet size, link rate and distance, then step the sum →01 The idea
Four numbers, and only one of them is a rate you can buy
A student says “my internet is slow” and means one of at least three unrelated things. The pipe is narrow. The pipe is wide but nothing is filling it. Or everything arrives perfectly and each thing takes a quarter of a second to start. Networking gives those three complaints three different names, three different units and three different fixes. Using one word for all of them is the fastest way to lose a networking round.
Bandwidth is a property of the link. It is the number of bits the link can carry per second, fixed by the hardware and the standard: Fast Ethernet is 100 Mbps whether you are sending anything or not, Gigabit Ethernet is 1000 Mbps. Bandwidth is a capacity, not a speed, and the pipe picture is the right one. A wider pipe carries more water per second. It does not make the water arrive sooner.
Throughput is what you actually measured on a real transfer. It is also in bits per second, so it is directly comparable with bandwidth, and it is always at or below it. Below, because of the sender’s window, a slower link further along the path, competing traffic, and anything that had to be sent a second time. Strip out the protocol headers and the retransmissions and count only the application bytes that arrived once and stayed, and that number is called goodput. It is the only one of the three the user ever feels.
Latency is a duration, measured in milliseconds. It is not a rate and it is not comparable with the other two at all. It is how long one bit’s journey takes, and it is made of four separate delays: the time to push the packet onto the wire, the time for the signal to physically cross the distance, the time spent waiting in a router’s buffer, and the time each node spends reading the header. Section 03 gives each one its formula and, more usefully, tells you what each one ignores.
Keeping them apart matters because they respond to different money. Bandwidth is bought. Latency is mostly geography, and the one part of it that is not geography is the part that changes every time the network gets busy.
02 Worked example
One 1500-byte packet, Delhi to Chennai, with every unit written down
This one path carries the whole lesson: the flow below, the console in section 04, and every number in the cheat sheet. It is a plain fibre route between two data centres, and the settings are the second preset in the console, so you can reproduce every line of arithmetic on screen.
| Quantity | Symbol | Value on this path |
|---|---|---|
| Packet size | L | 1500 bytes, one full Ethernet MTU |
| Rate of every link | R | 1 Gbps = 1 × 10⁹ bit/s |
| End-to-end distance | D | 2000 km of fibre |
| Signal speed in fibre | v | 2 × 10⁸ m/s, about two-thirds of the speed of light in vacuum |
| Links in the path | N | 4, so 3 routers sit between the two hosts |
| Processing at each router | dproc | 0.020 ms, given |
| Queuing at each router | dqueue | 0.100 ms, given, a lightly loaded path |
Those seven givens produce four delays. Read the flow left to right in the order the packet actually meets them at each node, and watch which one is enormous.
Now the arithmetic, one substitution at a time. Every line shows the expression with the numbers put in before it shows a result, because a result you cannot re-derive is a result you will not reproduce in an interview.
Look at where the time went. 10.000 ms of the 10.408 ms is propagation, and propagation is the one term in the list that a faster link cannot touch. Swap every 1 Gbps link for 10 Gbps and transmission falls from 0.048 ms to 0.0048 ms, so the one-way delay moves from 10.408 ms to 10.365 ms. That is a 0.4% improvement for a ten times faster network. The console in section 04 lets you make exactly that change and watch the total refuse to move.
The mirror image matters as much. Run the same 1500-byte packet across an office LAN at 100 Mbps over 200 m, two links through one idle switch, and the numbers invert. Transmission becomes 2 × 0.120 ms = 0.240 ms, propagation becomes 0.001 ms, and with the switch’s 0.020 ms of processing and no queuing the one-way delay is 0.261 ms, of which transmission is 92.0%. Here ten times the bandwidth genuinely helps: the one-way delay falls to 0.045 ms, an improvement of 82.8%. Those are the first preset in the console, so you can step them line by line too. Neither situation is the general rule. The ratio between packet size, link rate and distance decides which term wins, and that is the thing the next section makes systematic.
03 Mechanics
What each number measures, what it depends on, and what it ignores
Three of the four words in this lesson are rates in bits per second and one is a duration in milliseconds. Getting that straight is half the topic, so start there before touching a formula.
| Term | What it measures | Unit | Its ceiling | The lever that moves it |
|---|---|---|---|---|
| Bandwidth | The capacity of one link. A property of the hardware, present with no traffic on it at all. | bit/s |
The standard: Fast Ethernet 100 Mbps, Gigabit Ethernet 1000 Mbps, 802.11 and cellular vary by mode. | Buy a faster link. Nothing you do in software raises it. |
| Throughput | The rate you actually achieved end to end on a real transfer. | bit/s |
the narrowest link on the path |
Remove whichever thing is actually limiting: the sending window, congestion, or that one slow hop. |
| Goodput | Application bytes delivered per second, once headers and resent data are excluded. | bit/s |
throughput, always strictly below it |
Bigger payloads behind the same fixed headers, and fewer losses to retransmit. |
| Latency | The time one bit takes to get there. Not a rate, and not comparable with the three above. | ms |
none; it is a duration, so nothing caps it |
Move the endpoints closer. Of its four parts, only queuing responds to anything else. |
Now split latency into its four parts. The column that wins interviews is not the formula column, it is the one that says what each delay ignores, because almost every wrong answer in this topic comes from putting a variable into a formula it does not belong in.
| Component | Formula | Depends on | Ignores completely | On our path | Moves with load? |
|---|---|---|---|---|---|
| Transmission | L / R |
Packet size L and the rate R of the link it is being pushed onto, which is the sender’s outgoing link, then each router’s. | Distance. Entirely. | 0.012 ms per link, 0.048 ms over 4 |
no |
| Propagation | d / v |
Distance d and the medium. v is about 2 × 10⁸ m/s in copper and fibre and 3 × 10⁸ m/s for radio through near-vacuum. | Packet size and link rate. Entirely. | 10.000 ms |
no |
| Queuing | No closed form. Grows with traffic intensity La/R. |
How much is already in the outbound buffer, so on everybody else’s traffic and not on yours. | Nothing useful. This is the term that knows about the rest of the world. | 0.300 ms light, 15.000 ms congested |
yes, the only one |
| Processing | A per-router constant. | Header check and next-hop lookup, so on router hardware and table size. | Packet size, for all practical purposes. | 0.020 ms each, 0.060 ms over 3 |
barely |
Why transmission is paid once per link and propagation is not. Routers are store-and-forward devices: a router does not begin sending a packet onto its outgoing link until it has received the last bit of that packet and checked it. So the packet is pushed onto a wire once at the source and once again at every router, which is why an N-link path costs N × (L / R) and not one L / R. Propagation behaves the opposite way: it is charged over the total distance, and splitting 2000 km into four 500 km links or one 2000 km link gives the same 10 ms either way. Put the two together with the per-router terms and the whole path is d_total = N(L/R) + D/v + (N−1)(d_proc + d_queue) when every link runs at the same rate. When the links differ, drop the shortcut and add L/R separately for each one.
Why queuing is the only component that moves, and why it moves badly. A router’s outbound queue fills when bits arrive faster than the link can drain them. The measure is traffic intensity, La/R, where L is the packet size in bits, a is the arrival rate in packets per second and R is the link rate in bits per second. While that ratio stays well under 1 the queue stays short and queuing delay is negligible. As it approaches 1 the average queue length grows without bound, so delay does not degrade gently, it falls off a cliff. Push it past 1 and the buffer overflows and packets are dropped instead of delayed. That is why the same ping to the same server reads 12 ms at 3 a.m. and 300 ms at 9 p.m. with nothing about the cables having changed, and why oversized buffers make it worse rather than better, a failure with its own name: bufferbloat.
Round-trip time is not a clean doubling. RTT ≈ 2 × one-way + the responder’s own service time. Three things spoil the exact doubling: the return route may differ in distance and hop count, the queues in the two directions are not the same at the same instant, and the far end has to actually produce an answer. ping reports the RTT and never the one-way delay, so you cannot halve a ping and call it a one-way latency unless you know the path is symmetric. This is also the reason one-way delay measurement needs synchronised clocks at both ends and is genuinely hard.
The bandwidth-delay product is the volume of the pipe. BDP = R × RTT, and its unit is bits, not bits per second, because a rate multiplied by a time is a quantity. It is how many bits can be on the wire and unacknowledged at one moment. Its use is window sizing: a sender allowed at most W bits outstanding gets at most W / RTT of throughput regardless of what the link can carry. On our path, the largest window the original 16-bit TCP window field can express is 65,535 bytes, which is 524,280 bits, and 524,280 ÷ 0.020816 s = 25.2 Mbps. That is 2.5% of a 1 Gbps link, and nothing is broken. This is exactly what the window scaling option of RFC 7323 exists to fix, and it is why a link that is both fast and long is the case where window size matters most.
The two conclusions the arithmetic actually delivers. First: adding bandwidth never reduces propagation delay. Only the L / R term has an R in it, so a ten times faster network changes one of four terms and leaves the other three untouched. A geostationary satellite link makes the point brutally: about 239 ms one way from the distance alone, with a transponder happily carrying tens of megabits per second, so it is high bandwidth and high latency in the same breath. Second: for a small packet over a long distance, propagation dominates and the link rate is nearly irrelevant, while for a large transfer over a short distance the reverse holds and bandwidth is almost the whole answer. The interview-safe version is that the ratio of packet size to link rate against the ratio of distance to signal speed decides which one you are in, and you can compute it in ten seconds.
05 Cheat sheet
The numbers they ask you to produce out loud
Every row is something an interviewer can ask you to state or compute in under ten seconds, with no paper. The right-hand column is the specific wrong answer that gets given, not a general warning.
| What they ask | The answer | The trap |
|---|---|---|
| Transmission delay | d_trans = L / R | Putting distance in it, or using the receiver’s download rate instead of the rate of the link the packet is being pushed onto. |
| Propagation delay | d_prop = d / v, with v ≈ 2 × 10⁸ m/s in copper and fibre | using 3 × 10⁸ m/s, which is only right for radio through vacuum |
| Which component depends on packet size | transmission only | Claiming a bigger packet takes longer to propagate. It does not; only the pushing takes longer. |
| Which component varies with load | queuing only | blaming bandwidth for a ping that changes during the day |
| 1500 bytes onto a 1 Gbps link | 1500 × 8 = 12,000 bits ÷ 10⁹ = 0.012 ms | Forgetting the × 8 and being wrong by a factor of eight. |
| 2000 km of fibre | 2 × 10⁶ m ÷ 2 × 10⁸ m/s = 10 ms | Dividing kilometres by metres per second and landing 1000 times off. |
| Our four-link path, one way | 0.048 + 10.000 + 0.060 + 0.300 = 10.408 ms | paying transmission once for the path instead of once per link |
| Round-trip time on it | RTT ≈ 2 × 10.408 = 20.816 ms | Treating it as exactly double, with no responder time and an assumed symmetric route. |
| Bandwidth-delay product on it | 10⁹ × 0.020816 = 20,816,000 bits ≈ 2.60 MB | multiplying by the one-way delay instead of the round trip |
| Throughput ceiling of a fixed window W | W / RTT | Quoting the link rate instead, when a sender that waits for an acknowledgement before sending more never gets close to it. |
| Mbps against MB | 1 Mbps = 10⁶ bit/s and 1 MB = 8 × 10⁶ bits | Dividing a link rate by 1024. Link rates are powers of ten; only memory sizes are powers of two. |
| Goodput | throughput minus headers and retransmissions | Using it as a synonym for throughput, then being asked which of the two a packet capture shows. |
06 Where & why
Where these four numbers are decisions somebody already made
None of this is arithmetic invented for exams. Each of the four systems below exists because somebody worked out which term dominated and then attacked that term specifically.
A geostationary satellite sits 35,786 km up, so the up-and-down path is 71,572 km and radio at 3 × 10⁸ m/s takes about 239 ms one way whatever the modem cost. Starlink’s first shell orbits at roughly 550 km, so the same up-and-down path is about 1100 km and about 3.7 ms. The radios did not get faster. The distance got smaller, and that is the only lever propagation has.
Propagation is distance divided by a speed nobody can raise, so the only remaining lever is distance. Cloudflare answers your request from a data centre in your own city and uses anycast so the same address routes to the nearest one, collapsing d from thousands of kilometres to tens. The bytes returned are identical; only the geography changed. This is also why “buy more bandwidth” never fixes a site that feels sluggish.
The window field in a TCP header is 16 bits, so unaided a sender may have at most 65,535 bytes outstanding, which on a 20.816 ms round trip caps one connection near 25 Mbps no matter what the link carries. RFC 7323 negotiates a scale factor in the handshake, up to 14, lifting the ceiling to 65,535 × 2¹⁴ = 1,073,725,440 bytes. Linux enables it by default via net.ipv4.tcp_window_scaling and sizes the buffers from net.ipv4.tcp_rmem.
ping sends one small packet and reports the round-trip time, so it measures latency and is almost unaffected by bandwidth. iperf3 opens a stream and reports bits per second, so it measures throughput and says nothing about the trip time. Run both: a high ping with healthy iperf3 numbers is a distance problem, while a low ping with poor iperf3 numbers is a window, congestion or bottleneck problem, and the two have no fix in common.
07 Interview questions
What they actually ask
This is the topic interviewers use to find out whether you understand networks or have memorised them, because it can be checked with mental arithmetic in ten seconds. Expect to be handed a packet size, a link rate and a distance and asked for a delay out loud.
What is the difference between bandwidth and throughput?
A link is sold as 100 Mbps and my download manager reports 11 MB per second. Is somebody lying?
Name the four components of end-to-end delay and say what each one depends on.
Transmission delay uses a link rate. Whose link rate?
Which of the four varies with load, and why does that matter?
Two links run over the same 100 km of fibre, one at 1 Gbps and one at 10 Mbps. Which has the lower propagation delay?
Why is a satellite link called high bandwidth and high latency at the same time? Is that not a contradiction?
What is RTT and why is it not exactly twice the one-way delay?
What is the bandwidth-delay product and what is it used for?
What is goodput, and how would you see the difference between it and throughput?
You are handed a machine and told the network feels slow. What do you measure, and in what order?
08 Practice problems
Six sums, and the units are the difficulty
For every one: write down the units of each given, convert everything to bits, metres and seconds first, and only then substitute. Almost every wrong answer in this topic is correct arithmetic performed on two quantities that were measuring different things.