Network Performance
Latency is the delay between data being sent from its source and arriving at its destination. Every network has some latency because signals take time to travel and each piece of hardware takes time to handle the data.
Latency grows as data passes through more switches and routers, because each one has to read the data, work out where to send it and forward it on. It also grows as the distance travelled increases, since the signal is on the move for longer.
This is why latency is usually lower on a LAN than on a WAN. A LAN keeps data within one site and may only pass through a couple of switches, while on a WAN data crosses long distances and goes through far more routers.
These two ideas are often confused, but they measure different things.
| Aspect | Bandwidth | Latency |
|---|---|---|
| What it measures | how much data can be sent each second | how long data takes to arrive |
| Typical unit | megabits per second (Mbps) | milliseconds (ms) |
| If it gets bigger | more data moves each second, so a big transfer finishes sooner | data arrives later, so replies feel delayed |
A connection with high bandwidth can still have high latency, so paying for more bandwidth does not automatically make data arrive sooner.
Wired connections usually have lower latency than wireless ones, because a cable carries the signal straight to the device, whereas a wireless signal is broadcast through the air and can weaken with distance, adding delay.
High latency causes the biggest problems in real-time uses, where a reply is needed almost straight away. Suppose you steer a robot arm from another classroom over the school network: a half-second delay means the arm carries on moving after you release the control, and this lag makes it awkward to use. Sending a batch of photos to the printer is different, because the short delay at the start is tiny compared with the whole transfer.