What is a Content Delivery Network (CDN), how does it work and what are the results to expect (our feedback using CloudFront)?
The issues raised by an international traffic
Having an international development is usually good news for an e-commerce activity. However, a new technical issue will appear very soon; how to make sure that the website is fast enough for geographically distant people from your hosting server?
Why this issue? On every network communications, an unavoidable and incompressible delay is required for the data transfer. This time is not related to your server’s bandwidth nor the web user’s, but to the distance between them, and to the number of intermediary devices necessary to ensure this communication.
The remoteness of your user in relation to your website hosting has a strong impact on performances.
Here is the loading time that we used to observe on dareboost.com, hosted in France, from different locations (before a CDN was set up):
A Content Delivery Network is an efficient solution to face this issue.
What is a Content Delivery Network?
As its name indicates, a CDN is a network. There are several providers for these kind of networks (e.g. Cloudfront or Akamai), that allow their users to host contents, contents that will be duplicated to several locations across the world.
Setting up a CDN on dareboost.com, our feedback
We chose to use CloudFront, Amazon’s CDN. We could quickly configure it, it was really effortless.
We were able to measure the impact of the CDN use thanks to our monitorings that keep watching the main pages of our website from several probes: Paris, New-York, Sydney and Frankfort.
The positive effects of the CDN are stronger in Sydney, quite making sense since it is the farthest of our own hosting server. Here is the evolution of the loading time from this location before and after the CDN was set up:
The page, that would be fully loaded after about 5 seconds, now falls below 4 seconds, meaning a more than 20% saving.
The loading time of our static resources was, on average, divided by 10.
Before using the CDN :
After using the CDN :
The gain on the total loading time remains limited compared to the consequent gain observed on static resources. The culprit is mainly third parties’ resources, like the Google Fonts for instance (orange frames in the below timeline). But all the requests that are dependent of the user’s context (red frames) are also in cause, as they do not benefit from the CDN effects (they still need to join our server in France).
Even if we have still work to do to enhance the user experience on countries like the USA or Australia, we significantly better things by using a CDN. We are glad that we could set it up effortless, since we were already using an efficient cache policy and the versioning of our contents.
We take this opportunity to remind you how important are the best practices related to the use of cache and that can absolutely not be ignored for this kind of usage!
Is your international traffic important?
Go and check www.dareboost.com and you will be able to test the speed of your website from 4 different locations for free!