Networking

What is Latency?

Latency is the time delay between a user's request and the server's response, typically measured in milliseconds. Lower latency means faster page loads and better user experience. It is primarily affected by physical distance, network congestion, and server processing time.

How Does Latency Work?

Latency has several components: network latency (time for data to travel through cables and routers), processing latency (time for the server to generate a response), and transmission latency (time to transfer the data payload). A request traveling from New York to a server in Tokyo inherently has higher latency than one going to a nearby server due to the speed of light through fiber optic cables.

Reducing latency is crucial for user experience — Google found that a 100ms increase in latency reduced revenue by 1%. CDNs reduce latency by serving content from nearby edge servers. Other strategies include server-side caching, database optimization, keeping connections alive with HTTP/2, and using efficient DNS providers. For global audiences, deploying to multiple regions is essential.

Related Terms