Back to all questions

What is the Average Latency of a CDN?

Alex Khazanovich
CDN Latency
June 10, 2024

For a well-optimized CDN, the average latency is typically in the range of 20 to 50 milliseconds. However, in some cases, it can be lower, especially if the user is near a major data center, or higher if there are network congestion or routing issues. 

Major CDN providers like Cloudflare, Akamai, and AWS CloudFront often report latencies on the lower end of this spectrum.

How to Check CDN Latency?

To check the latency of a CDN, you can use several methods and tools:

  1. Ping Command: You can ping the CDN server to measure the round-trip time (RTT) for packets to travel from your computer to the CDN server and back.some text
    • Open a terminal or command prompt.
    • Use the command ping [CDN server address].
    • Observe the average time reported in milliseconds.
  2. Traceroute Command: This helps to trace the path packets take to reach the CDN server and measure the latency at each hop.some text
    • Open a terminal or command prompt.
    • Use the command traceroute [CDN server address] (or tracert [CDN server address] on Windows).
    • Review the latency at each hop along the path to the CDN server.
  3. Web Performance Tools: Various online tools can help you measure CDN latency.some text
    • Pingdom: Offers website monitoring and performance testing, including latency measurements and TTFB.
    • GTmetrix: Provides detailed performance reports, including CDN latency.
    • WebPageTest: Allows you to test website performance from different locations and provides insights into CDN latency.
  4. Browser Developer Tools: Most modern browsers have built-in developer tools that can help measure latency.some text
    • Open the developer tools (usually with F12 or right-click and select "Inspect").
    • Go to the "Network" tab.
    • Reload the page and observe the "Timing" details for various resources loaded from the CDN.
  5. Third-Party Monitoring Services: Services like New Relic, Dynatrace, or Datadog can provide detailed monitoring and reporting on CDN performance metrics, including CDN latency, website latency, and average latency speed.

Factors Affecting CDN Latency

Several factors affect average latency speed, including:

Factor Sub-Factor(s) Latency Range (ms) Description
Geographical Distance Same City 5 to 20 When the CDN server is located within the same city as the user.
Same Country 20 to 50 When the CDN server is located in a different city but within the same country.
Different Continent 100 to 200 When the CDN server is located on a different continent, leading to higher latency.
Network Congestion Low Congestion 10 to 30 Low network traffic allows for faster data transmission.
High Congestion 50 to 100 High network traffic can slow down data transmission, increasing latency.
Routing Efficiency Direct Routes 10 to 30 Data takes a direct path with fewer hops, reducing latency.
Multiple Hops 30 to 100 Data takes a more complex path with multiple hops, increasing latency.
Server Performance High Performance Server 5 to 20 Fast servers with high capacity can handle requests quickly, reducing latency.
Low Performance Server 50 to 100 Slower servers with limited capacity can delay request processing, increasing latency.
DNS Resolution Time Fast Resolution 10 to 20 Efficient DNS resolution speeds up the initial connection.
Slow Resolution 50 to 100 Delays in DNS resolution can add to the overall latency.
Peering Arrangements Good Peering 10 to 30 Favorable peering arrangements facilitate faster data transfer.
Poor Peering 50 to 100 Unfavorable peering arrangements can slow down data transfer, increasing latency.
Content Caching Cached Content 5 to 20 Content already cached on the CDN server is delivered quickly.
Non-Cached Content 50 to 200 Content that needs to be fetched from the origin server can significantly increase latency.