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).
But still, the the internet is slowly using more CDNs, rightfully so. The two major benefits of a popular CDN remain:
- Users may already have a library like jQuery cached by their browser, and
- DNS resolution and latency are likely lower when using a popular CDN.