AP® Computer Science Principles · Big Idea 4 · Topic 4.1
Bandwidth and Latency
Bandwidth is how much data can flow per second once it starts; latency is how long you wait before the first bit arrives at all. They're independent, so fixing one doesn't fix the other.
Every data transfer has two separate costs. Bandwidth measures capacity: how many bits per second a connection can carry, usually in megabits or gigabits per second. Latency measures delay: the time between sending a request and the first byte of the response showing up, usually in milliseconds. Think of a highway. Bandwidth is the number of lanes, which decides how many cars pass per minute once traffic is moving. Latency is the time it takes the first car to drive the whole length of the highway, which depends on distance and the speed limit, not lane count.
These two numbers come from different parts of the system, so changing one leaves the other untouched. Latency is set mostly by physical distance and the number of routers a signal passes through, since every router adds a small processing delay and every kilometer of cable adds travel time at close to the speed of light. Bandwidth is set by the physical medium and equipment, like fiber versus copper, or how many channels a router supports. A satellite link can have huge bandwidth but terrible latency because the signal has to travel to space and back.
This split explains why clicking a link feels slow even on a fast plan: most of that wait is the round trip to find the server, not the file itself downloading. It also sets up why distributed systems and real time applications like video calls or online games care about latency more than raw speed, and why engineers place servers closer to users (content delivery networks) instead of just buying more bandwidth.
Key terms
- Bandwidth
- The maximum amount of data a connection can carry per second, measured in bits per second.
- Latency
- The delay between sending a request and the first byte of response arriving, measured in milliseconds.
- Round trip time
- The time for a signal to travel from sender to receiver and back again.
- Throughput
- The actual rate of data transfer achieved in practice, which can be lower than the maximum bandwidth.
Watch it explained
- How it worksHow does bandwidth measure volume per second while latency measures the wait before anything starts?
- How it worksHow does the wait before the first byte arrives stay completely separate from how fast bytes flow once they start?
- Worked exampleFind how long a 50 megabyte file takes over a 20 megabit per second connection.
- Common mistakeWhy doesn't doubling your bandwidth cut a page load time in half?
- Going furtherWhat changes about a video call when latency is 400 milliseconds instead of 30?
Check yourself
End of topic.