Website Latency with and Without a Content Delivery Network
When it comes serving up your content around the globe in a fast and efficient manner, website latency becomes very important. We will never be able to get past the fact that there is physical distance involved which causes round trip time delays. However, you can dramatically decrease the latency by implementing a content delivery network (CDN).
50% of your 1-second page load time budget on mobile is taken up by network latency overhead.
What is website latency?
In terms of networking, latency can be defined by the time is takes for a request to travel from the sender to the receiver and for the receiver to process that request. In order words, the round trip time from the browser to the server. Don't get us wrong, this is not the same as the total download time or your website speed, latency is simply one factor when it comes to calculating the performance of your website or server.
There are four main causes that can affect latency times. These include transmission mediums, propagation, routers, and storage delays. Even fiber optics are limited by more than just the speed of light, as the cable and the repeaters or amplifiers introduce delays. Besides implementing a CDN, you can read more about other ways to reduce latency.
In one study, median desktop latency ranged from 65-145 milliseconds.
Website latency with and without a CDN
We wanted to show you the difference in latency times with and without a content delivery network (CDN) implemented. This is simply from a connectivity perspective. In this test we are again using our test website (hosted in Amsterdam, Netherlands) and KeyCDN's Ping Test tool that conveniently allows us to simultaneously test from the following 14 locations:
- Frankfurt, DE
- New York, US
- Miami, US
- Dallas, US
- San Francisco, US
- Seattle, US
- Toronto, CA
- London, UK
- Paris, FR
- Amsterdam, NL
- Singapore, SG
- Sydney, AU
- Tokyo, JP
- Bangalore, IN
Latency without a CDN
We first pinged our server without the CDN. This means it is being queried from around the world and is not cached.
We then gathered the average round trip time (RTT) response times without a CDN:
- Frankfurt, DE: 15.9 ms
- New York, US: 83.8 ms
- Miami, US: 114.9 ms
- Dallas, US: 123.8 ms
- San Francisco, US: 140.9 ms
- Seattle, US: 136.8 ms
- Toronto, CA: 92.9 ms
- London, UK: 9.8 ms
- Paris, FR: 8.9 ms
- Amsterdam, NL: 1.1 ms (this is very low because our website is hosted in Amsterdam)
- Singapore, SG: 259.8 ms
- Sydney, AU: 286.3 ms
- Tokyo, JP: 255.7 ms
- Bangalore, IN: 141.5 ms
Latency with a CDN (KeyCDN)
We then pinged our website from the CDN edge servers (POPs) throughout the KeyCDN global network. This means it is queried from each POP around the world and is cached.
We then again gathered the average round trip time (RTT) response times but this time with a CDN:
- Frankfurt, DE: 0.1 ms
- New York, US: 1.2 ms
- Miami, US: 0.5 ms
- Dallas, US: 1.3 ms
- San Francisco, US: 2 ms
- Seattle, US: 0.5 ms
- Toronto, CA: 7.5 ms
- London, UK: 1.6 ms
- Paris, FR: 1.2 ms
- Amsterdam, NL: 1.1 ms
- Singapore, SG: 1.4 ms
- Sydney, AU: 0.5 ms
- Tokyo, JP: 0.8 ms
- Bangalore, IN: 0.9 ms
We then compared the results between the two and found the latency between our origin server (without a CDN) and our POPs (with a CDN) on average is decreased by 83%:
|Server (POP) location||No CDN RTT||KeyCDN RTT||Difference|
|Frankfurt, DE||15.9 ms||0.1 ms||- 99.37%|
|New York, US||83.8 ms||1.2 ms||- 98.57%|
|Miami, US||114.9 ms||0.5 ms||- 99.57%|
|Dallas, US||123.8 ms||1.3 ms||- 98.95%|
|San Francisco, US||140.9 ms||2 ms||- 98.58%|
|Seattle, US||136.8 ms||0.5 ms||- 99.64%|
|Toronto, CA||92.9 ms||7.5 ms||- 91.93%|
|London, UK||9.8 ms||1.6 ms||- 83.67%|
|Paris, FR||8.9 ms||1.2 ms||- 86.52%|
|Amsterdam, NL||1.1 ms||1.1 ms||- 0%|
|Singapore, SG||259.8 ms||1.4 ms||- 99.46%|
|Sydney, AU||286.3 ms||0.5 ms||- 99.83%|
|Tokyo, JP||255.7 ms||0.8 ms||- 99.69%|
|Bangalore, IN||141.5 ms||0.9 ms||- 99.36%|
As you can see, using a content delivery network (CDN) can dramatically decrease the latency involved when delivering your content around the globe, due to the physical distance dramatically being reduced. This is a very important factor in helping increase your website's overall speed. The example above was only using 14 of our 40+ POPs. You can also use KeyCDN's Traceroute Test tool to test the connectivity or routing issues from 14 locations in parallel.