All guides
Home Glossary Latency
Term

Latency

The time delay between a request for data and the start of the data's transfer.

Latency is the time delay between a request for data and the start of the data's transfer. In networking and server operations, it is typically measured in milliseconds (ms) as Round-Trip Time (RTT), representing the total duration for a data packet to travel from a client to a server and back again. Unlike bandwidth, which measures the maximum volume of data transferred per second, latency measures the responsiveness of a single network interaction.

How it works

Total network latency is the sum of several sequential delays accumulated as packets move across infrastructure:

  • Propagation delay: The physical time required for a signal to travel through a medium like fiber-optic glass or copper wire. Because light travels slower in fiber than in a vacuum, intercontinental routes face strict physical minimums—such as roughly 65ms between London and New York—while traffic within a single metropolitan area typically stays under 10ms.
  • Transmission delay: The time needed to push all bits of a packet onto the physical network link, determined by packet size and link data rate.
  • Processing delay: The time routers, switches, firewalls, and load balancers spend inspecting packet headers, checking routing tables, and applying security rules.
  • Queuing delay: The time packets wait in router buffers during periods of high network congestion before they can be forwarded to the next hop.

In distributed systems and microservices architectures, these delays compound quickly. When a single client request triggers multiple sequential internal API calls, even minor network delays between nodes can noticeably slow down the final response.

Example

You can measure network latency and inspect individual router hops from a Linux terminal using ping or mtr. For example, sending five ICMP echo requests to a remote host reveals the minimum, average, and maximum RTT alongside packet loss:

$ ping -c 5 203.0.113.10
PING 203.0.113.10 (203.0.113.10) 56(84) bytes of data.
64 bytes from 203.0.113.10: icmp_seq=1 ttl=57 time=1.42 ms
64 bytes from 203.0.113.10: icmp_seq=2 ttl=57 time=1.38 ms
64 bytes from 203.0.113.10: icmp_seq=3 ttl=57 time=1.45 ms
64 bytes from 203.0.113.10: icmp_seq=4 ttl=57 time=1.39 ms
64 bytes from 203.0.113.10: icmp_seq=5 ttl=57 time=1.41 ms

--- 203.0.113.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 1.380/1.410/1.450/0.026 ms

In real-time environments like algorithmic trading, VoIP, or online gaming, keeping this number low is critical. For instance, placing a trading terminal on a London Forex VPS inside the same data center ecosystem as the broker's matching engine reduces RTT to nearly 1ms, preventing price slippage during order execution.

What matters when choosing a server or hosting

  • Geographic proximity: Host compute instances as close as possible to your end users or upstream APIs. If you are deploying real-time automation, consult a low latency forex hosting guide or check the physical location of the target service's primary gateway, such as Discord's US East voice and API servers when selecting a VPS for Discord bots.
  • Peering and transit providers: A provider with direct peering agreements and Tier-1 transit carriers routes traffic in fewer hops, avoiding indirect detours through distant exchange points.
  • Virtualization overhead: Dedicated servers and KVM-based virtual machines with dedicated CPU cores minimize hypervisor scheduling delays compared to oversold shared hosting environments.

Common mistakes

  • Upgrading bandwidth to fix slow responses: Increasing port speed from 1 Gbps to 10 Gbps increases throughput capacity for large file transfers, but it does not reduce propagation delay for small, latency-sensitive packets.
  • Testing only from a local workstation: Measuring latency from your home office tells you nothing about server-to-server latency between your application and an external database or third-party API.
  • Ignoring application-layer overhead: Focusing solely on raw ICMP ping while overlooking TLS handshake round-trips, uncached DNS lookups, or slow database queries leaves major sources of delay unresolved.

FAQ

What is the difference between latency and jitter?

Latency is the time it takes for a single packet to travel between two points, whereas jitter is the variation in latency over time. High jitter causes packets to arrive out of order or in uneven bursts, which degrades audio and video streams even when average latency looks acceptable.

Can software optimization lower network latency?

Software cannot bypass the physical speed of light over long distances, but you can reduce perceived and protocol-level latency using HTTP/3 (QUIC), TLS session resumption, connection pooling, and edge caching via a Content Delivery Network (CDN).

What is considered a good latency score?

Acceptable thresholds depend entirely on the workload. Under 20ms is ideal for real-time gaming, voice calls, and interactive web applications; under 100ms works well for standard websites and REST APIs; and under 2ms is standard for co-located financial trading infrastructure.

All glossary terms

Glossary

Related terms

Full glossary

New guides every week.

A digest of the best pieces on servers, VPN and self-hosted software. No ads, no spam.

1 email a weekOne-click unsubscribeRU · EN
Only slipjar.app articles, nothing else.