Network latency, sometimes called lag, is the term used to describe delays in communication over a network. Latency meaning in networking is best thought of as the amount of time it takes for a packet of data to be captured, transmitted, processed through multiple devices, then received at its destination and decoded.
When delays in transmission are small, it’s referred to as a low-latency network (desirable) and longer delays are called a high-latency network (not so desirable).
Long delays that occur in high-latency networks create bottlenecks in communication. High latency decreases communication bandwidth, and can be temporary or permanent, depending on the source of the delays.
Latency is measured in milliseconds, or during speed tests, it’s referred to as a ping rate. Obviously, zero to low latency in communication is what we all want. However, standard latency for a network is explained slightly differently in various contexts, and latency issues also vary from one network to another.
Causes of network latency?
1. Distance
One of the main causes of network latency is distance, or how far away the device making requests is located from the servers responding to those requests.
The amount of time it takes for a request to reach a client device is referred to as Round Trip Time (RTT). While an increase of a few milliseconds might seem negligible, there are other considerations that can increase latency.
- There’s the to-and-fro communication necessary for the client and server to make that connection in the first place.
- The total size and load time of the page
- Problems with network hardware which the data passes through along the way.
Data travelling back and forth across the internet often has to cross multiple Internet Exchange Points (IXPs), where routers process and route the data packets, often having to break them up into smaller packets. All this additional activity adds a few milliseconds to RTT.
2. Website construction
The way webpages are constructed makes a difference latency. Webpages that carry heavy content, large images, or load content from several third- party websites may perform more slowly, as browsers need to download larger files to display them.
3. End-user issues
Network problems might appear to be responsible for latency, but sometimes RTT latency is the result of the end-user device being low on memory or CPU cycles to respond in a reasonable timeframe.
4. Physical issues
In a physical context, common network latency causes are the components that move data from one point to the next. Physical cabling such as routers, switches and WiFi access points. In addition, latency can be influence by other network devices like application load balancers, security devices, firewalls and Intrusion Prevention Systems (IPS).
How to Measure Network Latency?
- RTT – the amount of time it takes a packet to get from the client to the server and back.
- TTFB – the amount of time it takes for the server to receive the first byte of data when the client sends a request.
How to Reduce Network Latency
Subnetting is another way to help reduce latency across your network, by grouping together endpoints that communicate most frequently with each other.
Additionally, you could use traffic shaping and bandwidth allocation to improve latency for the business-critical parts of your network.
Finally, you can use a load balancer to help offload traffic to parts of the network with the capacity to handle some additional activity.