Latency is the delay between when data is sent from one point and when it arrives at another. It's measured in milliseconds (ms) and is distinct from bandwidth, which measures capacity, and from jitter, which measures variation in latency.
Latency has four components: propagation delay (how long the signal takes to travel the physical medium, limited by the speed of light), transmission delay (how long it takes to push the data onto the link), processing delay (time spent in routers and switches), and queuing delay (time spent waiting in buffers when the link is congested).
Measuring latency
The most common measurement is round-trip time (RTT): you send a packet to a destination and measure the time until the reply comes back. The ping tool does this using ICMP Echo Request/Reply packets. One-way delay (OWD) measures only the outbound journey, but requires synchronized clocks at both ends and is harder to measure in practice.
Why it matters
High latency makes real-time applications feel sluggish: video calls lag, online games stutter, and interactive web pages respond slowly. DNS queries, TLS handshakes, and API calls all add latency at each hop. For time-sensitive services, even 100ms of added latency can degrade user experience. CDNs and load balancers reduce latency by placing servers closer to users.
TipLatency and bandwidth are independent: you can have high bandwidth (fast data transfer) but high latency (slow response time), or vice versa. Both matter for different reasons.