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.
Site performance without CloudFlare or Minify – 4.355 seconds
Here is the performance with CloudFlare:
Site performance with Cloudflare – 3.376 seconds
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:
Site performance with WP Minify – 3.343 seconds
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.
No need to use Cloudflare, we can match its performance by adding WP Minify to already installed WP Super Cache. This might vary with each site.
|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.
The solution to this is to go to Development Mode when making changes to your static content (this bypasses our cache).
Doing load testing with CloudFlare active on a domain can look like an attack. In addition, load testing is in place to test your servers & not ours. If you want to run a load test for your server, it is best to have CloudFlare turned off while the test is run (we also recommend this to folks that use one of our app partners called Blitz).
The DNS control is how we provide our services to customers (security, caching, etc.).
We will offer CNAME pointing in the future. This would mean, however, that we couldn’t proxy or cache things like A records.
Thanks for stopping by.
But it seems you are not really answering our questions: we wanted to test CloudFlare performance under load. Personally I think it can’t be much good as you won’t let anyone test it and our tests without load but just speed came up with a slight disadvantage to CloudFlare.
There is no reason you need to have full DNS control to be able to provide security and caching. More disinformation.
You don’t need to proxy and cache everything on an entire domain and it’s subdomains. Frankly, I would like to have some control over what part I give control to you.
This black box approach at CloudFlare and the indifferent performance tests really raise my suspicions about what exactly it is you are providing to customers and users.
I have just had an unfortunate experience with cloudfare. I joined up getting i page to change the nameservers on my wp site. Yes it was faster but then I got random pop ups and when i asked for support from ipage got none because unbeknownst to me i was no longer registered with them!
To the average user, all these caching plugins appear to need a PhD to figure any of them out. I’ve been considering the cloudfare option, but also didn’t like the idea of giving up the DNS zone. I’ll give this Minify plugin a try. BTW, I seriously have a love/hate relationship with your blog because just about everything you “debunk”, I’m probably guilty of using or considering in the near future. All of these issues you talk about keep me from moving more of my students’ sites to WordPress…such a headache.
Just use WP Super Cached and don’t worry about the rest. You get 80% of the speed benefit from a simple configuration of WP Super Cache which is unlikely to take your site down.
Making the web work for you, Alec
Incapsula.com is a great alternative. It requires a simple edit of your DNS records and voila its on. However, their pricing has changed recently and may not be worth it. We can achieve similar results with caching, minify plugins…
You should really have tested your site speed from more locations than one. One of the great advantages a site running CloudFlare (or any CDN for that matter) has is the ability to serve clients around the world faster than it would otherwise.
We’d love to hear some additional real world stories about CloudFlare: whether CloudFlare worked for you or didn’t and why
The advantage of Cloudflare depends where most of your visitors are, and where your hosting company is. For example, if most visitors are the UK, and hosting is in the USA (this is very common, e.g. Bludhost/Hostgator/Hostmonster etc servers are mostly in Utah) then if Cloudflare CDN has a server in the UK performance should be much better. A lot of modern WordPress sites make heavy use of plugins and images. This results in MANY http requests. So a key metric is the response time. With 40-50 requests, this has a massive impact. The other factor is first-byte time – if it takes 1 second to first byte, then your site will never be super-fast! Chris
Minify has stopped being developed, but WP Better Minify seems like a good alternative nowadays.
it’s old article but still nice to say that Cloudflare minify working good, and better than minify WordPress plugin because its not crazy strong.
I will recommend light CloudFlare plugin for WP: wordpress.org/plugins/cf-littlebizzy/
then, you enable minify JS and HTML and CSS in CloudFlare panel.
last is, dont enable Rocket loader, it sucks.