What is Latency?
Definition
Latency is the time it takes for a request or data packet to travel from source to destination, or to make the round trip and return, usually measured in milliseconds. On the web it most often means round-trip time (RTT). Bandwidth is the maximum amount of data a connection can carry and throughput is what it actually carries; latency measures not how much data moves but how long the journey takes.
Also known as: network latency, round-trip time, RTT, ping time, lag

Latency, bandwidth and throughput
All three get lumped together as “internet speed”, but they measure different things. Think of a pipe: bandwidth is its width, latency is its length, and throughput is how much water is actually flowing through it each second.
| Concept | Question it answers | Unit | Example |
|---|---|---|---|
| Latency | How long does a packet take there and back? | Milliseconds | 40 ms RTT |
| Bandwidth | What is the most the link can carry? | Mbps, Gbps | A 100 Mbps fibre plan |
| Throughput | How much is actually moving right now? | Mbps, or requests per second | 63 Mbps measured during a download |
Throughput can never exceed bandwidth and is usually below it, dragged down by packet loss, congestion and latency itself. On the server side, throughput also means how many requests a system handles per unit of time. The two are related but distinct: an API can process thousands of requests per second (high throughput) while each one still takes 800 ms (high latency).
Why a faster plan often does not feel faster
Downloading a large video is limited by bandwidth. A web page is mostly a chain of small, dependent requests: the browser cannot know the stylesheet's URL until the HTML arrives, or the font's URL until the stylesheet arrives. Each link in that chain waits at least one round trip, and upgrading from 100 Mbps to 1 Gbps does nothing to shorten those waits.
Latency also has a physical floor. Light travels through optical fibre at roughly 200,000 km per second, so every 1,000 km of cable adds at least 5 ms one way and 10 ms round trip. Real cable routes are longer than straight lines and pass through routers, so measured figures sit above that minimum. Serving visitors in Europe from a server in Australia adds hundreds of milliseconds to every round trip, however fast the server is.
Counting round trips in a web request
A first HTTPS request to a server the browser has not talked to yet spends several round trips before any content arrives:
- DNS lookup: resolving the domain to an IP address, unless it is cached.
- TCP connection: the three-way handshake, one RTT.
- TLS handshake: one RTT with TLS 1.3, two with TLS 1.2.
- Request and response: one RTT plus server processing time; the browser-side measure of all this is TTFB.
On a 100 ms RTT connection that is 300 to 400 ms before the first byte, even if the server takes no time at all. A redirect chain, especially one that hops to another hostname, makes you pay part of that bill again. QUIC, the transport under HTTP/3, merges the transport and encryption handshakes and removes one of those round trips.
Percentiles, not averages
Latency distributions are lopsided: most requests are quick and a few are very slow. An average hides that tail. Latency is therefore reported as percentiles: p50 (the median) shows the typical experience, while p95 and p99 show what the unluckiest users get. If rendering a page requires calls to ten backend services, the slowest response sets the pace, so a rare p99 delay in each service becomes a common delay at page level.
Reducing latency
- Move content closer: a CDN and edge functions answer from a location near the user.
- Cut round trips: remove unnecessary redirects, make critical resources discoverable early in the HTML, flatten request chains.
- Reuse connections: HTTP/2 and HTTP/3 carry many requests over one connection, and preconnect starts third-party connection setup early.
- Measure the server side: database queries, outbound API calls and cold starts are latency too, and no network tweak will fix them.
- Cache: the request you never make has zero latency.

