When researching the W3TC cache plug-in for WordPress, it mentioned that using a CDN would help with performance.  I noticed a while ago that Media Temple offered a CDN service using CloudFlare.  I activated it but then the configuration required changing DNS name servers to be Media Temple and didn’t want to spend the time because my websites were very simple HTML based.

However, I decided in an effort to learn more about performance, I should take a look.  So, in addition to CloudFlare, I decided to try the one recommended by W3TC which was MaxCDN.  Also, an intro video to W3TC mentioned using Amazon Web Services.  I liked that since it is one of the big cloud provider.  I decided against AWS right away because CloudFlare was a free add-on service for Media Temple customers.

I changed the names servers for one of my test domains and then was able to activate the domain on CloudFlare and received my CloudFlare account.  I found it interesting that the account was a “free” account which I could have signed up for myself.  It said the service was configuration-free so I waited a day to start testing results.  I then ran a few of my performance tools but really didn’t see much of a difference.  I was able to do a direct comparison because I had the test domain and the live domain with the exact same content.

Since I wasn’t seeing any improvements, I started researching the support documents on both Media Temple and CloudFlare.  I did learn about analytics on CloudFlare.  It was showing me that nothing was being cached.  I also found a support article that mentioned that you could check the HTTP headers to see if the CloudFlare cache was either a HIT or MISS.  I was seeing some hits but nothing in analytics.  I also found out that not all files are cached.  It was mainly static content like JPGs and HTML files which there wasn’t a lot of with WordPress.  So, I decided to send emails to support for both companies.  However, the support really didn’t answer my questions.  Media Temple said everything was configured to use CloudFlare.  CloudFlare support said it was being cached but didn’t provide an answer for the lack of cache hits.  So, I decided to give up.

My next step was to start over and research CDNs in general.  CloudFlare did come up as a good provider.  I briefly looked at Azure but it was really focused on static content and optimizing Azure websites.  MaxCDN was also recommended.  But, there was a cost.  If this was for a business website, the cost was reasonable but this was just research.

So, I decided to signup for CloudFlare independent of Media Temple.  I didn’t like that fact I had to use a CNAME record to “www” and it wouldn’t work on a website that didn’t use “www”.  I had setup the website not to use “www” so not sure if that might be an issue.  The setup was very straightforward.  CloudFlare became the DNS name server for the domain which seems better since they would have direct control of the DNS records.  The configuration was very easy.   https://support.cloudflare.com/hc/en-us/articles/201897700

I then found an article that mentioned how to optimize W3TC and CloudFlare  http://www.bloggingspell.com/w3-total-cache-cloudflare/.  This was great and I followed the steps.

My final step was to re-run the performance testing.  After many tests, I was able to see improvements.  I also created a test HTML page with a bunch of large JPG files.  This test really showed the improvements. I also noticed a lot of improvements on second load of the websites.

To summarize, a CDN does show improvements but it is also take a fair amount of configuration work.