There are many factors that affect the speed of a web resource. One of them is network latency. Let’s take a closer look at what latency is, how it affects application performance, and how it can be reduced.

What Is Latency?

Broadly speaking, latency is any delay in the execution of some operations. There are different types of latencies: network latencies, audio latencies, when broadcasting video during livestreams, at the storage level, etc.

Basically, any type of latency results from the limitations of the speed at which any signal can be transmitted.

Most⁠—but not all⁠—latency types are measured in milliseconds. For example, when communicating between the CPU and SSD, microseconds are used to measure latency.

This article will focus on network latency, hereinafter referred to as “latency”.

Network latency (response time) is the delay that occurs when information is transferred across the network from point A to point B.

Imagine a web application deployed in a data center in Paris. This application is accessed by a user from Rome. The browser sends a request to the server at 9:22:03.000 CET. And the server receives it at 9:22:03.174 CET (UTC+1). The delay when sending this request is 174 ms.

This is a somewhat simplified example. It should be noted that data volume is not taken into account when measuring latency. It takes longer to transfer 1,000 MB of data than 1 KB. However, the data transfer rate can be the same, and the latency, in this case, will also be the same.

The concept of network latency is mainly used when discussing interactions between user devices and a data center. The lower the latency, the faster users will get access to the application that is hosted in the data center.

It is impossible to transmit data with no delays since nothing can travel faster than the speed of light.

What Does Network Latency Depend On?

The main factor that affects latency is distance. The closer the information source is to users, the faster the data will be transferred.

For example, a request from Rome to Naples (a little less than 200 km) takes about 10 ms. And the same request sent under the same conditions from Rome to Miami (a little over 8,000 km) will take about 120 ms.

There are other factors that affect network latency.

Network quality. At speeds above 10 Gbps, copper cables and connections show too much signal attenuation even over short distances, as little as within a few meters. With increasing interface speeds, fiber-optic network cables are mainly used.

Route. Data on the Internet is usually transmitted over more than one network. Information passes through several networks—autonomous systems. At the points of transition from one autonomous system to another, routers process data and send it to the required destination. Processing also takes time. Therefore, the more networks and IX there are on the package’s path, the longer it will take for it to be transferred.

Router performance. The faster the routers process data, the faster the information will reach its destination.

In some sources, the concept of network latency also includes the time the server needs to process a request and send a response. In this case, the server configuration, its capacity, and operation speed will also affect the latency. However, we will stick to the above definition, which includes only the time it takes to send the signal to its destination.

What Is Affected by Network Latency?

Latency affects other parameters of web resource performance, for example, the RTT and TTFB.

RTT (Round-Trip Time) is the time it takes for sent data to reach its destination, plus the time to confirm that the data has been received. Roughly speaking, this is the time it takes for data to travel back and forth.

TTFB (Time to First Byte) is the time from the moment the request is sent to the server until the first byte of information is received from it. Unlike the RTT, this indicator includes not only the time spent on delivering data but also the time the server takes to process it.

These indicators, in turn, affect the perception of speed and the user experience as a whole. The faster a web resource works, the more actively users will use it. Conversely, a slow application can negatively affect your online business.

What Is Considered Optimal Latency and How to Measure It?

The easiest way to determine your resource’s latency is by measuring other speed indicators, for example, the RTT. This parameter is closest to latency. In many cases, it will be equal to twice the latency value (when the travel time to is equal to the travel time back).

It is very easy to measure it using the ping command. Open a command prompt, type “ping”, and enter the resource’s IP address or web address.

RTT is the time parameter. It is 24 milliseconds in our example.

It depends on the specifics of your project what the optimal RTT value is. The average specialist considers less than 100 ms as a good indicator.

What Is the Best Way to Reduce Latency?

Some basic guidelines are as follows:

Reducing the distance between the data origin and the users. Your servers should be placed as close as possible to your clients.

Enhance network connectivity. The more peer-to-peer networks (networks you can share traffic with) and route options you have, the better the route you can build and the faster the data will be transferred.

Enhance traffic balancing. Using different routes to distribute large amounts of data will reduce network load. This will speed up the transfer of information.

Using a CDN—a network of servers that collects, caches, and delivers information using the shortest route—will help with the first and second points. By using a global network with good connectivity, you will be able to reduce latency significantly.

Keep in mind, however, that latency is only one factor affecting users' perception of application performance. Although the latency is low in some cases, the website still loads slowly in others. A slow server can cause this, for example.

For an application to be significantly speeded up, complex optimization is usually required.

In summary

  • The first. Data latency is the time it takes for data to be delivered across a network.
  • The second. Distance is the main determinant. The quality of the network and the route (number of networks and points of exchange) also affect it.
  • The third. The latency of a web resource affects other parameters, such as RTT and TTFB. Search engine rankings and conversion rates are affected by them.
  • The fourth. An easy way to determine the latency of a resource is to measure its RTT. Using the ping command, you can do this. RTT should be less than 100 milliseconds.
  • The fifth. Latencies can be reduced most effectively by enabling a CDN. Clients and data origins will be closer thanks to a content delivery network, and routing will be improved as well. In turn, this will lead to a faster transfer of information.

Data transfer speeds are excellent with AgileCDN. Regardless of the size of the file, we deliver it with minimal delay anywhere in the world.

We offer a free plan. See how much faster your resource will be on our network.