The Battle of CDNs: Comparing CloudFlare and Incapsula

Jacco Blankenspoor

Faster delivery of content and security are two key aspects of any website. Having both available together is icing on the cake. CloudFlare and Incapsula offer CDN and security as a service on freemium model. We are going to compare the services of two providers based on their offerings and basic tests. The comparison should provide you with a basic tool-set to evaluate your needs if you have to choose among the two! We are going to evaluate services available in free plan but that should be enough for most of webmasters.

Locations

CloudFlare has 18 edge servers with 10 located in US, 4 in Europe and one each in HongKong, Sydney, Sigapore and Tokyo. Incapsula has 9 edge servers spread across US & Europe, one each in Singapore and Tokyo. Your audience distribution should decide the choice of selection, as Incapsula has limited presence in Asia.

Caching

CDN greatly improves the performance of website, but these providers also offer minification of scripts and compression of images. CloudFlare has Rocket Loader feature which caches static and dynamic content and resources from various sites and loads them asynchronously. Incapsula too offers similar features.

Bandwidth limitations

Incapsula caps the bandwidth at 50GB/month, while CloudFlare does not have any limits on bandwidth. One of the good things about CloudFlare is that you can have one website on free plan and another one on a premium plan all with same account.

Analytics

CloudFlare details visits by visitors, crawlers, bots and identifies any possible threats. It also provides data on bandwidth saved and other operations metrices. Comparison of visitor visits vs. crawler & bot visits an important advantage when comparing with Google Analytics reports. Incapsula statistics are pretty much on same line with minor variations.

Fig. 1: Analytics with CloudFlare

Fig. 2: Analytics with Incapsula

Setting up

Configuration of any of these providers for your website is fairly easy. Configuration involves providing your website name and making a small change in DNS settings. Installation or upload of the website is not required. You have to use your own or hosted DNS with Incapsula while CloudFlare provides free load balanced DNS service.

Optimal configuration

CloudFlare has plenty of options to configure, we will look at some key points.

Fig. 3 : Performance settings in CloudFlare

When configuring the performance settings, you can use the presets or make a custom profile as shown in Fig. 3. I use CDN + Full optimizations, but with a TTL of 4 hours.

Fig. 4 : Performance settings with Incapsula

Incapsula has rather simplified configuration for performance as shown in Fig. 4. You can change the acceleration mode to “Off” or “Standard” (basic caching), you can setup www. version as the standard, and show a seal which let your visitors know Incapsula is protecting it.

Test results

Now let’s put them to the test, and compare the results. I did a speed test (Webpagetest.org), a load test (LoadImpact.com) and a YSlow / Google Page Speed test (GTMetrix.com). The tests were done a few days after the website was added to CDN, to get accurate results. Test site is hosted on a VPS in the Netherlands, and is serving the UK market. It’s a fairly optimized site, with HTML caching enabled. Let’s look at results:

Speed test (Webpagetest.org)

Webpagetest.org uses a “First view” and “Repeat view”, to replicate what happens when a visitor visits your site for the first time, and later visits. I used this service to measure the load times from 4 different locations: Miami – US, Wellington (in New Zealand, one of the farthest locations in terms of distance), London (in the UK, my target market) and Amsterdam (in the Netherlands, where my site is hosted).

Miami, US Wellington, NZ London, UK Amsterdam, NL
First view CloudFlare 2,1s 7,78s 1,97s 1,72s
First view Incapsula 5,6s 9,89s 5,01s 3,81s
Repeat view CloudFlare 0,98s 4,21s 0,91s 0,97s
Repeat view Incapsula 2,93s 2,93s 3,8s 1,83s

CloudFlare is providing a consistent and fast experience from around the globe, for both new and returning visitors. Wellington shows poor performance with both service providers.

Load test (LoadImpact.com)

LoadImpact.com gives you the opportunity to see how your site is holding up with multiple visitors at the same time. We tested 50 concurrent users. Both tests didn’t show up in test server’s load statistics, confirming that CDN was delivering the content and not loading the servers where website is hosted.

As you can see in chart below, CloudFlare starts with a higher load time, but falls down at 10 concurrent users, and performs consistently up to 50 users.

Incapsula shows a stable chart, but with a higher load time as seen in chart below. Poor results with Incapsula might be attributed to LoadImpact running tests from Israel servers instead of Tokyo servers.

YSlow / Google Page Speed test (GTMetrix.com)

I always use GTMetrix.com to measure my Yahoo YSlow and Google Page Speed score. They rate your site and give you recommendations to improve your score. The lower YSlow grade for Incapsula is affected by the fact that it isn’t recognized as a CDN by GTMetrix.com (CloudFlare is). But that’s not the only reason for lower score of Incapsula. CloudFlare actively works on the recommendations by Google and Yahoo, which improve their optimization, giving it a higher rating

Test performed when hosted at CloudFlare (GTMetrix.com) 

Test performed when hosted at Incapsula (GTMetrix.com)

Conclusion

CloudFlare has a much better reach in terms of edge locations. It also offers a wide array of choices when it comes to configuration. Incapsula on other hand might be much straight forward path when it comes to configuration. We have of course compared basic options available in free version from both service providers. You should definitely consider offerings available in premium and enterprise versions before making the final call.

Update: I recently came across an excellent article about the security features of both providers. Read here (PDF).

Win an Annual Membership to Learnable,

SitePoint's Learning Platform

  • KS2 Problema

    As a developer whose hosting company briefly added CloudFlare services to their options, I experimented with it. It was AWFUL. Not only did it actually slow down access, but one of their top bozos allowed himself to get hacked, which then apparently spread to many of their client sites, including some of my fellow clients at my gobsmacked and mortally embarrassed hosting company.

    But I didn’t find out the real back story (about the CF exec who allowed the demons in through his account) until the big Apple/Amazon cloud horror story blow-up.

    The cloud may be the future, but as long as humans are implementing the transition, there are going to be problems — and there are going to be problem companies you really don’t want to have to deal with.

    • http://techtrace.wordpress.com Vishal Biyani

      Thanks for your comment. Your point is correct to the fact that however the technology changes, there is no replacement for due diligence!

  • Liz

    This article did seem a little biased towards Cloudflare …

    • http://techtrace.wordpress.com Vishal Biyani

      Liz, we have stayed objective in our description and have used facts and figures to represent the picture. We are and would like to be neutral to any provider and let the facts speak for themselves

  • JamesOH

    No doubt about it, CF will provide slightly better acceleration.
    But the 4%-6% speed difference does not compensate for bugs and lack of various security options.
    After reading this I kinda feel that the writer missed an important point:
    CF is an acceleration service, while Incapsula is a security company that also does acceleration.
    Not exactly apples and oranges… but defiantly different types of fruit.
    CF performance are better, but Speed is almost all their can offer, while Incapsula provides many additional security features, better stability and, IMAO, a much more complete overall package.
    After using both services (sometimes at the same time for different sites of mine) I thinks that for you should use CF for speed, but if looking for speed and security, you should try Incapsula.

    • http://techtrace.wordpress.com Vishal Biyani

      James, you have made an extremely good point! You are quite on the spot. I think the idea of the article was to look at a provider where a shopper can buy both security and speed, but as we see that does not quite fit the bill. Incapsula definitely does security better and unfortunately we could not cover that in detail. Thanks for your candid feedback though. Get in touch with me from “Write for us” page if you would like to discuss more.

  • Damon Billian

    Thanks for the post. It might be worth mentioning that we’re not actually hosting the sites (some people think we’re a host).

    “but one of their top bozos allowed himself to get hacked, ”
    Only one client site was affected by this issue (that site was actually the target of the attck). We have a pretty good write-up on our blog covering the whole issue here: http://blog.cloudflare.com/the-four-critical-security-flaws-that-resulte

    ” Not only did it actually slow down access, but”
    Did you contact us about this? It is honestly very unusual for us to slow a site down, unless the site’s visitors are in a location we don’t have a POP in, so any details would have been helpful to know.

    “CF is an acceleration service”
    This is not entirely true. We have security features as well, including things like challenging known problematic visitors and a WAF (we’re currently working on a new WAF as well).

  • Lyndsey

    Just wanted to add that I have had personal run-ins with the CloudFlare team. They are very, very, very corrupt and immoral people and CDN is not the first thing on their minds (advertising on your site and finding minuscule excuses to launch a challenge page is. Trust me on this one, it’s internally discussed more than CDN and Security measures). Also, CF claims to be a security service as well (making a correction to a comment). One more thing, if you ever post, comment, say anything bad about CloudFlare, they will copy and paste what you say and add rude remarks under your words and go all the way as to threaten lives and ruin websites. I can’t get into much more, but everyone needs to know the truth about how corrupt CloudFlare and all their employees are.

    • http://techtrace.wordpress.com Vishal Biyani

      Hi Lyndesy, I think your comments have no facts to support and no real data to prove what you are saying. I would appreciate if you speak with data in hand, and keep the environment positive in general! I have approved comment as a moderator only to communicate a strong message against such baseless accusations!

  • Gail

    Hiya all,
    I discovered this, relatively recent, CF vs Incapsula comparative security review.
    http://www.ehackingnews.com/2012/11/incapsula-vs-cloudflare-security-review.html
    Its extremely detailed – with over 20 pages of data.
    This “white” hacker by the name of Philip performed about 20 different pen-tests and documented his research and findings in the report and in video. So, if in doubt, you really should check this out.

  • Ayesh

    Even though cloudflare advertises that there are no bandwidth limits, there is a limit. I guess it’s not a fixed rate but I recently got an email about that (I double checked the sender).

    Overall, cloudflare offers a very good service for the price. Their analytics and threat control features are great – I mostly benefit from them rather than performance improvements.

  • 99Wallpaper

    Sometime Cloudflare got DDoS attack
    Who have better network stable ?