CloudPe
Glossary

Latency

CloudPe Team
Latency

No matter how fast software becomes, every network on Earth eventually hits an immovable barrier: the speed of light.

Even inside high-speed fiber-optic cables, light travels at roughly 200 kilometers per millisecond. That means data crossing from New York to London takes ~28 milliseconds purely to cover the physical distance. Before a single router or server even processes the request.

Latency is this unavoidable delay. While bandwidth measures how much data can move at once. Latency measures how fast a single piece of data gets there.

What is latency?

Latency is the time it takes for data to travel from one point to another over a network, usually measured in milliseconds (ms). In practical terms, it’s the delay between clicking something and seeing it happen. Sending a request to a server and get a response back.

Lower latency means a faster, more responsive experience. Higher latency means noticeable lag, whether that’s a slow-loading webpage, delayed video calls, or input lag in online gaming.

In everyday applications, latency is the tangible “lag” you experience: the pause between tapping a link and the page loading, the awkward crossover in a video call, or the input delay in an online multiplayer game.

What causes latency

The following are the reasons that cause latency:

  • Physical distance: Data travels at a finite speed, even over fiber optic cables. The farther it has to go, the longer it takes, which is why a server closer to the user responds faster.
  • Network hops: Data usually passes through multiple routers and switches on its way to a destination. Each hop adds a small amount of delay.
  • Processing time: The time a server takes to actually process a request before sending a response back.
  • Congestion: Heavy traffic on a network can queue up data packets, adding delay, similar to traffic slowing down a commute.
  • Connection type: Fiber, cable, and mobile networks all have different baseline latency characteristics, with fiber generally being the fastest.

Latency vs bandwidth

These two get confused often, but they measure completely different things:

TermWhat it measures
LatencyHow long a single request takes to get a response (delay)
BandwidthHow much data can be transferred at once (capacity)

A useful analogy: think of a highway. 

Bandwidth is how many lanes the highway has; more lanes mean more cars can travel at once. Latency is how long it takes one car to reach its destination. 

You can have a highway with many lanes (high bandwidth) but still have a long drive (high latency) if the destination is far away. Adding more bandwidth doesn’t fix latency caused by distance.

Types of latency

The following are types of latency:

  • Network latency: Delay caused by data traveling across a network, the most common meaning of the term.
  • Disk latency: Delay in reading or writing data to a storage device.
  • Application latency: Delay caused by how long an application takes to process a request internally, separate from network delay.

What counts as “good” latency

There’s no single number that applies everywhere; it depends on the use case:

  • Web browsing: Under 100ms feels instant to most users.
  • Video calls: Above 150ms, conversations start to feel slightly off, with noticeable delay or people talking over each other.
  • Online gaming: Competitive games often need latency under 50ms, since even small delays affect gameplay.
  • High-frequency trading: Measured in microseconds, where even tiny amounts of latency can matter financially.

How to reduce latency

The following are pointers to reduce latency:

  • Use servers closer to your users: Hosting in a data center near your audience cuts down the physical distance data has to travel, which is often the single biggest factor.
  • Use a CDN: A content delivery network caches content in multiple locations worldwide, so users pull data from a nearby server instead of one far away.
  • Reduce network hops: Simpler, more direct network paths mean fewer places for delay to build up.
  • Optimize application performance: Faster backend processing means less time spent before a response is even sent.
  • Use a wired connection where possible: Wired connections are generally more consistent and lower-latency than Wi-Fi or mobile data.

How to check latency

The simplest way is a ping command, which sends a small request to a server and measures how long the response takes to come back:

ping example.com

The result shows round-trip time in milliseconds, how long it took for the request to reach the server and the response to return.

Where latency matters in cloud infrastructure

Latency is a key reason data center location matters. An application hosted far from its users will always have a higher baseline latency, no matter how well-optimized the code is. It also affects load balancing decisions, since some load balancers route traffic to whichever server can respond fastest.