Self-hosting on a dedicated infrastructure beats using popular CDNs

In using content delivery networks (CDNs), I've found them to be adequate for development, but not production websites.

Taking into account page speed and load times, using a popular CDN is not a good idea for production websites that care about performance. Some of these machines running the CDNs are absolutely stressed with the load they take in, often.

I did several page load tests with a popular font icon library -- hosted within a dedicated server vs on a popular CDN (bootstrapcdn). The results? Load time was drastically reduced by over 100 milliseconds when served up from an optimized, dedicated server over the HTTP/2 protocol (which is unfortunately only supported by browsers over HTTPS).

Also, I should mention that specific files (JavaScript, CSS, HTML, PHP) get gzipped by the server before they are delivered for further performance. This brings the jQuery library down to a measly 29.2 KB (~about 1/3rd of the original size). And, browser caching is setup properly so as to reduce load time after initial loading.

But still, the the internet is slowly using more CDNs, rightfully so. The two major benefits of a popular CDN remain:

  1. Users may already have a library like jQuery cached by their browser, and
  2. DNS resolution and latency are likely lower when using a popular CDN.

perm_identityAli Jaffar

schedule

visibility634 reads

labelMarked:

Did you enjoy this post?  


menu