Even though we cover a lot of the ground when it comes to performance and security, there are other services that might add some value to your wpPERFORM site. One of those services is CloudFlare, and it’s fully compatible with wpPERFORM. For background on what CloudFlare does, check out their own overview of CloudFlare. They offer both free and paid plans to protect and accelerate your web site. Having won top-spot honors from the Wall Street Journal in the Network and Internet Technologies category for 2 years in a row, it’s worth a look.
In essence, CloudFlare works by having your site’s DNS records point to name servers provided by CloudFlare, where it has already captured your existing DNS settings. Using CloudFlare means a visitor does 2 DNS lookups instead of 1, but CloudFlare typically has very fast DNS resolution. February 2013 tests by SolveDNS show CloudFlare to have the third-fastest DNS resolution of tested services. That extra lookup isn’t a big penalty.
Once CloudFlare has connected to your site, you can continue to manage your DNS settings through your CloudFlare dashboard. They provide control over the performance boost you want to achieve and the degree of security you want to put in place. Seeking maximum performance increases the chance that you break some functionality on your site. Likewise, maximum security ups the likelihood that your security measures generate false positives and block or inconvenience legitimate site traffic.
To make use of CloudFlare, you’ll need your own domain and access to your domain registrar to update your DNS records. In this article, we’ll cover basic CloudFlare setup for one of our sites, http://wp-optimized.com, which was already mapped to that domain on our network. http://wp-optimized.com is a wpPERFORM site that is delivered to you via the CloudFlare network. It’s a simple 1 page site with content that doesn’t change. Since CloudFlare caches the content it serves, the site should be served very fast.
We don’t intend this to cover all of CloudFlare’s features, since there are better resources for that online. We’re just going to make our test site live on CloudFlare to demonstrate how it works and take a few performance measurements.
Create Your CloudFlare Account and Add Your wpPERFORM Site
The first step to using CloudFlare is to create your account, which involves providing your email address, choosing a secure password, and agreeing to their terms of service. Since it’s pretty straightword, we’re going to skip to the next step, Select a website. Enter your primary domain and click the Add Website button. If you have multiple sites, you can add them after you’ve completed the setup of your first site by visiting the Websites menu at the top of the CloudFlare site.
Once you’ve added your wpPERFORM site, CloudFlare needs to go out and scan your DNS records. The scanning process takes a short period of time, during which you can watch a video with information on how CloudFlare works.
Once CloudFlare has read your DNS records, you have a chance to change how they’re recorded on CloudFlare. Remember that once you enable CloudFlare for a site, you’ll manage the DNS records for that site through your CloudFlare dashboard, not your domain registrar. Below is a screenshot for the DNS records of our test site. Since we don’t use email on this test site, we’ll go ahead and follow the on-screen instruction to delete the MX record.
You’ll next be asked to choose a service plan and settings for performance and security. For our test site, we’ve chosen the free plan with bleeding edge speed and medium security.
Here’s CloudFlare’s description of its performance options:
And its security choices:
The free CloudFlare plan we selected does not support SSL, and CloudFlare asks for confirmation of that choice, since traffic that attempts to use a secure connection will see an error message. It’s also another nudge to consider a paid plan. For our test site, we’re happy with our choice, so we’ll confirm our plan choice and move on to the final step of updating our DNS at domain registar with the name servers specified by CloudFlare.
CloudFlare only specifies 2 name servers, so if your primary domain is already mapped on wpPERFORM, you’ll change 2 of your name servers and delete the third. Completing this step requires you to skip over to your domain registrar and record the changes. When done updating your domain registar’s records, click the I’ve updated my nameservers, continue button.
It may take some time for the changes you make at your domain registrar to propagate.
When propagation is complete, the Websites link in the top menu will show your domain with a green check mark. It should look similar to our test site in the screenshot above.
With that small effort, our test site is now served up through CloudFlare’s global network. Although it was easy to get started with CloudFlare, did our effort produce any meaningful results? Let’s dig a little deeper.
Will CloudFlare Boost Your Site’s Performance?
Our answer is a qualified “maybe.” For sites on wpPERFORM, we’ve already delivered most of the possible performance gains without CloudFlare. In a single test before we enabled CloudFlare, our test site loaded in 283 ms. With CloudFlare enabled, our first test reduced that load time to 233 ms. That’s a big percentage gain, but the absolute reduction is small because our site is already loading so fast. Likewise, wpPERFORM sites can handle large traffic volumes, so performance won’t degrade much, if at all, as traffic volumes increase. Sites on shared servers or poorly configured VPS setups aren’t so lucky, so CloudFlare’s performance boost might appear more dramatic. If you’re on a shared host or don’t have a properly configured VPS and need to handle growing traffic, we think a better approach is to invest in right-sized hosting that can support your traffic rather than use CloudFlare to prop up an underpowered server.
Like every good content delivery network (CDN), CloudFlare serves sites from its global network using servers closest to each visitor. For cross-continent visitors to a wpPERFORM site, the performance boost is likely to be bigger than shown in our simple test. A handful of cross-continent page load tests showed that CloudFlare was always faster, often by more than 1 second. But that boost for some of your traffic comes at a risk to all of your traffic: that CloudFlare is sometimes a little slower or is off-line. In another test of the response from our test site with CloudFlare enabled, the home page loaded in over 700 ms – a big jump from the 283 ms recorded without CloudFlare.
To be sure, these are just one-of-a-kind tests, and our own response time varies, so one has to use caution when drawing firm conclusions from very small samples. But our example data show that using CloudFlare can sometimes make your site load faster, but it can make it slower as well.
Will CloudFlare Improve Your Site’s Security?
Similar to our assessment of CloudFlare’s impact on performance, our view is that improvements to security are small for most sites hosted on wpPERFORM. There’s no doubt that CloudFlare has impressive skills when it comes to web security. Their role in mitigating the DDoS attack on SpamHaus is solid evidence of that. But on wpPERFORM, we’ve already tightened security compared to a typical self-hosted WordPress installation. CloudFlare uses a challenge system for those found to have engaged in spam or hacking. On wpPERFORM, if we have evidence that a visitor has engaged in spam or made a hacking attempt, we block that traffic. Their database of bad actors is likely much larger than ours, but ours is more specific to WordPress-powered sites and our network, so it’s not clear that a bigger list of bad actors adds meaningful protection.
Further, CloudFlare’s ability to mitigate DDoS attacks comes in a feature that is only available on paid plans that start at $200/month per website. Most small websites aren’t likely to be hit by attacks of the scale that require this service. Serving your site from multiple servers – something wpPERFORM already does independent of CloudFlare – does help mitigate smaller attacks, but since the multiple-server model is already in place for wpPERFORM sites, the benefit of adding a free CloudFlare account is diminished.
The Value of Redundancy
Beyond performance and security, there’s an important but less discussed benefit to CloudFlare: the value of redundancy. CloudFlare uses Anycast technology to announce the availability of a CloudFlare-served site from all of its data centers. In early 2013, there were 23 such centers worldwide.
Just like physical roadways can experience breakdowns and traffic slowdowns, the availability and performance of the Internet’s paths can vary. For example, if there’s a traffic problem in Atlanta, Anycast gives CloudFlare the ability to serve a site to an Atlanta visitor from its Miami data center until that problem is resolved. Without Anycast, the Atlanta visitor would follow his normal path to your web server, which might include your site being unavailable to him until the traffic problem is resolved.
In our view, redundancy is an important benefit of CloudFlare, probably more important than performance or security for most wpPERFORM sites.
Conclusion
Different site owners will reach different conclusions on the value of CloudFlare’s service. Sites with a broad mix of cross-continent visitors may find improved page load times because of CloudFlare’s global content delivery network. Others may reasonably conclude that using CloudFlare adds unnecessary complexity without delivering significant performance improvements to justify that step. Still others may determine that the benefit of redundancy alone is worth the effort to implement CloudFlare.
The right decision for you and your site depends on your needs and traffic. On wpPERFORM, we make it easy for you to put CloudFlare to use if you so choose.