# Latency

URL: https://softwaredictionary.org/terms/latency
Category: Networking
Last updated: 2026-09-30
In Turkish: Gecikme
Pronunciation: LAY-tun-see

In short: Latency is the delay between sending a request and the start of a response, usually measured in milliseconds, and it shapes how responsive an app feels.

## What is latency?

Latency is the time it takes for data to travel from one point to another, or for a system to start responding after a request. In networking, it is usually measured in milliseconds (ms), often as round-trip time (RTT): how long a message takes to reach its destination and for the reply to come back. Lower latency means a faster, more responsive experience.

Several delays add up to total latency. Signals need time to physically travel through cables, and that speed is limited by the speed of light, so distance matters; routers and switches add processing and queuing delays; and the server adds its own processing time. Every extra round trip, such as a TCP handshake or a TLS negotiation, multiplies the effect, which is why protocols and apps try to reduce the number of trips.

Latency matters most for interactive things, such as online games, video calls, trading systems, and web pages that make many small requests. Common ways to cut it include serving content from a CDN close to users, caching results, reusing open connections, and combining requests. Command-line tools like `ping` and `traceroute` help measure it.

Latency is often confused with bandwidth. In a highway analogy, bandwidth is the number of lanes, which decides how many cars can pass per second, while latency is how long a single car takes to drive from one end to the other. A connection can have huge bandwidth and still feel slow if its latency is high, as with a traditional geostationary satellite link.

## Key takeaways

- Latency is delay, usually measured in milliseconds.
- Round-trip time (RTT) measures how long a message takes to go and come back.
- Physical distance, network hops, queuing, and server processing all add to latency.
- Latency and bandwidth are different: one is delay, the other is capacity.
- CDNs, caching, and fewer round trips are common ways to reduce latency.

## Example: Measuring latency from the command line

```bash
# Measure round-trip time to a host (4 attempts)
ping -c 4 example.com
# Output includes lines like: time=18.4 ms

# See each network hop and its delay on the way there
traceroute example.com

# Time the phases of an HTTP request with curl
curl -o /dev/null -s -w "connect: %{time_connect}s  first byte: %{time_starttransfer}s\n" https://example.com
```

## Frequently asked questions

**What is a good latency?**

It depends on the use. For online games and video calls, under about 50 ms feels smooth, while delays above roughly 150 ms become noticeable. For web pages, low latency matters most when a page needs many requests one after another.

**What is the difference between latency and ping?**

`ping` is a tool that sends a small message to a host and measures how long the reply takes. The number it reports, which gamers often call their ping, is a measurement of round-trip latency.

**Does more bandwidth reduce latency?**

Not directly. More bandwidth lets you send more data per second, but it does not make each piece of data travel faster; reducing latency usually requires shorter distances, fewer hops, or fewer round trips.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
