There's been a lot of buzz about CloudFlare over the last year. Poor man's CDN and load distribution, a quick way to "supercharge" your website. We were excited about CloudFlare too when we first heard about it. For both visitors and for Google SEO, it's very important to have a fast site these days.
Last year in April 2011, we made a written offer five times to test CloudFlare's performance when we were doing some benchmarking with LoadImpact. Our interest was honest: we were thinking about moving some of our very busy websites over to CloudFlare on a pay plan. Strangely, CloudFlare emphatically refused our offer. CloudFlare's refusal to allow live load testing aroused suspicion and we chose not to take the risk of putting our own client sites there.
Recently, we had another opportunity to take a close look behind the CloudFlare hype. And here's what we found.
How CloudFlare Works:
CloudFlare Alternative for WordPress:
Our CloudFlare Test:
We tested how these two different technologies compare in speeding up a WordPress website. We used one of our client's websites - Chicago Divorce Lawyer and run the tests using WebPagetest.org (highly recommended). The site was hosted on LiquidWeb.
First screenshot shows how the site loads without Cloudflare and Minify. It's pretty slim and fast already - there are few Bytes to download and few Requests. The site was already using WP Super Cache at this point.
Here is the performance with CloudFlare:
The site loads 1 second faster - see Fully Loaded - Time. The site size was reduced by close to 100KB - see Fully Loaded - Bytes In.
Notice that Keep-alive and Compress text were enabled this time.
- Keep-alive reduces latency in subsequent requests and that saves some time when loading the site.
Since the results turned out to be better, we started to think - how can we add Keep-alive and Compress text features to the site without using Cloudflare?
LiquidWeb support technicians offered us to move the site to a different shared server which has Keep-alive enabled, but they could not setup mod_deflate Apache module for us - required for Gzip compression of the text files.
So we decided to add the compression with a WordPress plugin. WP Minify serves this purpose. It's a WordPress implementation of the Minify PHP script.
It was easy to setup, here are the results - same speed as with CloudFlare:
We still miss Keep-alive, but the site is now only 175KB - less than 198KB which we got by enabling Cloudflare.
WebPageTest.org gives us mark "B" for the compression, while it gives "A" to Cloudflare. That's because it only gives "A" if all of them are compressed.
|LiquidWeb server||4.355 seconds|
|LiquidWeb server with Minify||3.343 seconds|
(we used median value out of 3 test runs)
Both systems add additional level of complexity to your website. Minify might require troubleshooting and CloudFlare takes over your DNS zone.
- Advantage: Better compression than Cloudflare
- Advantage: Less requests than Cloudflare
- Advantage: Editing of CSS files is easier, as the local minified version updates faster than Cloudflare
- Advantage: Might help your site sustain bigger traffic - which could be important on shared server hosting environments. You don't need to upgrade your hosting plan or move to a better host or troublesome so soon.
- Potential Advantage: CloudFlare provide a Free plan which already contains various claimed security enhancements
- Disadvantage: Takes over your DNS zone for the domain. This also needs to be checked during setup.
- Disadvantage: Changes to CSS files are not instant - it takes time for Cloudflare to update.
At this point it's not really worth using CloudFlare with WordPress unless you are a complete technical newbie and CloudFlare comes built into your hosting control panel. This is the case with LiquidWeb. Otherwise, you are better off just setting up WP Super Cache or WP Super Cache and Minify.
I would be very wary of moving my whole DNS set up to CloudFlare for a sophisticated domain. It's a lot of trouble to move DNS around and make sure all services are working. I'm not sure why CloudFlare has to have full control of DNS.
I'd certainly have more patience for CloudFlare if they could offer a way to use their service without handing over the complete DNS (even if it means assigning several subdomains to CloudFlare manually).
We'd love to hear some additional real world stories about CloudFlare: whether CloudFlare worked for you or didn't and why.
Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.