Latency
- 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.
At a glance
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
# 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.comReaders ask
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.
Often compared
See also
- BandwidthNetworking, p. 2Bandwidth is the maximum amount of data a network connection can carry per second, usually measured in megabits or gigabits per second (Mbps or Gbps).
- CDNDevOps & Cloud, p. 7A CDN is a network of servers spread around the world that stores copies of website content and delivers it to each user from the nearest location.
- CacheBackend & APIs, p. 8A cache is a fast, temporary storage layer that keeps copies of frequently used data so later requests can be served quickly without repeating slow work.
- TCPNetworking, p. 30TCP is a core internet protocol that delivers data between two programs reliably and in order, by opening a connection and resending anything that gets lost.
- PacketNetworking, p. 20A packet is a small, formatted unit of data sent across a network, made of a header with addressing information and a payload that carries the actual data.
- Load BalancerDevOps & Cloud, p. 34A load balancer is a server or service that spreads incoming traffic across several backend servers so no single one is overloaded and the app stays available.
- ThroughputNetworking, p. 32Throughput is the amount of data or work a system actually handles per unit of time, like megabits per second on a network or requests per second on a server.
Spotted a mistake or something missing on this page?Suggest an edit