Using CDNs to Reduce Network Latency

What is Network Latency?

In relation to overall network performance, latency is the number of milliseconds for your web content to begin rendering in a visitor’s browser.

In relation to network computing, latency is the time taken for a site visitor to make an initial connection with your webserver. This includes the processing of that connection by your webserver and for the initial data packets to be transmitted back to the visitor.

Latency can be affected by several factors, including:

  • Round trips – When a site visitor browses to a page, they initiate an object request such as HTML files or scripts. The interval it takes for the request to reach your server and return to the user is referred to as round-trip time (RTT). It’s affected by the total distance between the visitor and your server, as well as the number of hops through which the packets are routed.
  • Server metrics – A correlation exists between latency on your site and server metrics. These include the speed of your server, the type of drives used (e.g., HDD, SDD) and its total installed RAM.

By minimizing latency, you’re able to correspondingly reduce page load time and enhance your site visitor’s experience. E-commerce sites are the biggest winners here; studies show that even the shortest of delays drives visitors elsewhere. In The Essential CDN Guide, it’s reported that “studies show that a second-long delay causes a 7 percent drop in conversions, an 11 percent drop in page views and a 16 percent drop in customer satisfaction.”

How to Measure Latency

You can measure latency using the following methods:

Round-trip time – Round trip time is measured using a Ping, a command line tool that bounces a request off a user’s system to any targeted server (e.g., RTT is determined by the interval it takes for the packets to be returned to the user.

While the ping value provides a reliable assessment of latency, network congestion or throttling can occasionally provide a false reading.

Time to first byte (TTFB) – Once your webserver gets an initial user request, the time taken for the visitor’s browser to begin rendering a requested page is called time to first byte (TTFB). It’s measured in two ways:

  • Actual TTFB – The time taken for the first data byte from your server to reach a visitor’s browser. Network speed and connectivity affect this value.
  • Perceived TTFB – The time taken for a site visitor to perceive your web content as being rendered in their browser. The time it takes for an HTML file to be parsed impacts this metric, which is critical to both SEO and the UX.

Time to first byte


How CDNs Reduce Your Network Latency

CDNs can lower your network latency in several ways, including:

  • Content caching – Available through a CDN’s global network of strategically placed points of presence (PoPs), exact copies of your web pages are cached and compressed. This greatly decreases RTT and latency, as your site visitors are typically served content from the PoP closest to their location.
  • Connection optimization – Session reuse and network peering optimize connections between visitors and origin servers. Additionally, TCP pre-pooling—whereby several standby connections are preemptively opened to limit connection time for follow-on requests—serves as yet another performance enhancement. Premium CDNs further boost connection speeds by utilizing a tier 1 network, which routes requests using a minimal number of hops.

Showing CDN peering with a Tier 1 ISP for faster data delivery

  • Progressive image rendering – For any image, a progressive series is overlaid over one another in the visitor’s browser. Each overlay is of a higher quality resolution. The visitor’s perception is that the page is being rendered more quickly in their browser than it would be otherwise.

Beyond latency reduction, additional ways CDNs improve your website’s page load times include front-end optimization (FEO) techniques, minification, file compression and image optimization.

Keep your finger on the pulse

Sign up for updates from Imperva, our affiliated entities and industry news.