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. - WPT
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. - WPT
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 site (hosted in Dallas, TX) and KeyCDN’s ping test tool which conveniently allows us to simultaneously test from the following 14 locations:
- New York, US
- Miami, US
- Toronto, CA
- Dallas, US
- San Francisco, US
- Seattle, US
- Sao Paulo, BR
- Frankfurt, DE
- London, UK
- Paris, FR
- Amsterdam, NL
- Singapore, SG
- Sydney, AU
- Tokyo, JP
Latency without a CDN
We first pinged our server without the CDN. This means it querying from around the world and is not cached. We gathered the average round-trip time (RTT) response times.
- New York, US: 36.908ms
- Dallas, US 0.751ms (obviously this is very low because our website is hosted in Dallas)
- San Francisco, US: 39.645ms
- Frankfurt, DE: 123.072ms
- London, UK: 127.555ms
- Paris, FR: 112.417ms
- Amsterdam, NL: 118.418ms
- Singapore, SG: 202.682ms
- Sydney, AU: 191.848ms
- Tokyo, JP: 130.804
Latency with CDN (KeyCDN)
We then pinged our site from the CDN servers (POPs) throughout the KeyCDN global network. We then again gathered the average round-trip time (RTT) response times. Remember your assets are cached on these POPs, and served up from them instead of your origin server.
- New York, US: 18.096ms
- Dallas, US: 1.138ms (the slight increase is most likely due to increase in hops, even though location is the same)
- San Francisco, US: 18.900ms
- Frankfurt, DE: 3.734ms
- London, UK: 4.548ms
- Paris, FR: 1.689ms
- Amsterdam, NL: 10.364ms
- Singapore, SG: 2.002ms
- Sydney, AU: 0.705ms
- Tokyo, JP: 3.379ms
And here are the results between the two.
|Server (POP) location||No CDN RTT (ms)||KeyCDN RTT (ms)||Difference %|
|New York, US||36.908||18.096||- 50.97%|
|Dallas, US (origin server)||0.751||1.138||+ 51.53%|
|San Francisco, US||39.645||18.900||- 52.33%|
|Frankfurt, DE||123.072||3.734||- 96.97%|
|London, UK||127.555||4.548||- 96.43%|
|Paris, FR||112.417||.689||- 98.5%|
|Amsterdam, NL||118.418||10.364||- 91.25%|
|Singapore, SG||202.682||2.002||- 99.01%|
|Sydney, AU||191.848||0.705||- 99.63%|
|Tokyo, JP||130.804||3.379||- 97.42%|
The latency between our origin server (without a CDN) and our POPs (with a CDN) on average is decreased by 73%!
You can also use KeyCDN’s Traceroute Test tool to test the connectivity or routing issues from 10 locations in parallel.
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. And this example above was only using 10 of our 25 POPs.