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.
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.
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.
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.
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
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.
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.
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)
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).