Using CloudFlare FREE CDN to Boost Your Website Performance

cloudflare-logo

Cloud hosting is quickly becoming the next big thing, and the industry standard in the world of web hosting. What cloud hosting means, essentially, is that rather then 1 single server, there are numerous servers distributed around the world hosting your content, and the server which is closest to the user accessing your site will be chosen to serve the files.

For obvious reasons, most CDN services are premium, pay-based services, as the costs of running a distributed network are significant. What free service offerings do exist generally fall flat in terms of performance, or have limited timeframes to get you hooked on the free service before they start charging. CloudFlare (http://www.cloudflare.com) however sets themselves apart from these services by offering their users a free base tier for their CDN with no time limitations, no bandwidth limitations… and the service actually has some pretty solid performance.

The services CloudFlare offers also goes above and beyond a basic CDN. They offer dynamic website optimizations, security from hacking attempts and more. Lets explore these services further…

CloudFlare CDN

freeimage-5211217-webCloudFlare’s CDN actually works a bit differently then a typical CDN.

A typical CDN is essentially a file storage server which distributes your files across the cloud. When building your website you then link to these resources on the cloud storage server rather then off your primary web host, allowing for parallel / distributed loading of files.

CloudFlare is a not a file server in this regard. You will never upload your files to them for storage. Instead, CloudFlare is going to take over the role of your DNS, so that all traffic coming to your website will go through CloudFlare, and they then act as a caching service for your files. As users access your site, all the data and images and whatnot get pulled up to CloudFlare from your webhost, and are then cached for the next users that access the site. So essentially, your site only needs to serve an image once every few hours, or days, depending on how long you set your caching time for, and CloudFlare will serve the image for the remainder of that time.

CloudFlare Optimizer

CloudFlare can employ a number of website optimizations to your pages.

AutoMinify is a tool to shrink all the extra white space from your CSS and JavaScript files, reducing both the transport time to the user, as well as the time required for the browser to parse the data.

CloudFlare can also employ asynchronous data loading to your content, meaning that CSS and JavaScript files can be loaded in parallel rather then 1 by 1. Essentially what this means is that if you have numerous CSS or JS files, as is often the case with a plugin heavy CMS based website, the files will all load at once, rather then the browser having to make calls 1 by 1 to load the files, waiting for the first one to finish each time.

CloudFlare Security

freeimage-10256751-webThe security module essentially acts as a global blacklisting tool and boasts a number of other features.

CloudFlare can detect DDOS, Spam and other attacks to your site and will automatically block those attacks. Users who are responsible for the attacks will not only be blocked from your site, but blocked on the entire CloudFlare network. The result of this is a community driven blacklist, where your site will reap the benefits of all the other users sites who have undergone attacks.

CloudFlare Other Services

CloudFlare also offers an in depth analytics and reporting system, and has tie ins to a ton of other online web applications and services.

An example of a web application tie in, is that CloudFlare is able to connect with your Google Analytics account and replace the need for a javascript driven connection to your Analytics. This means that could see an increased accuracy of your Google Analytics information, because you will not be prone to missing counts of users without JavaScript enabled, and users who stop and do not load the entire page to the end.

Does it Work?

Enough tech talk… Does the service actually work?

I had some mixed results with CloudFlare. When I was previously hosting my website off my home server, running off a netbook, I had some pretty poor WordPress performance. I discovered CloudFlare while looking to improve my site, and implementing it increased my site performance drastically.

However, I recently moved from my home web server to a web hosting provider and my natural response times were greatly improved. Now when I add CloudFlare into the mix, I was actually getting ~1000ms extra added to my response time from the service (according to a few days worth of A/B pingdom testing).

This of course, does make some sense. CloudFlare is essentially adding another layer of requests that need to take place between your server and the CloudFlare server, so if your site was already performing quite well, that could add extra time to the response.

So… what is CloudFlare good for then?

  • Improving performance on slow, laggy sites. ie: Home operated servers, or sites using bogged down shared hosts.
  • Reducing bandwidth. If your site has a fair bit of traffic then having images and scripts cached on the server can greatly reduce the amount of data your host needs to serve. This can cut down costs if you are pushing the bandwidth limits of your provider.
  • Security from DDOS attacks and other malicious attacks. Let’s face it, if your on a regular web host and get undergo a DDOS attack, your site is basically toast. It’s also not out of the question for your web host to kick you to the curb if these kind of issues persist.

Other concerns?

  • Sites which are already operating with strong performance could see a decrease from the extra responses required for CloudFlare’s service
  • The community based black-listing could mean that legitimate users are being blocked from your site if they were incorrectly blacklisted on other sites
  • Requires moving your DNS servers to CloudFlare which increases DNS response times for that extra resolution to take place

Conclusion

CloudFlare is not a must have, fix all solution for website performance and security, but it does provide some extremely valuable services to the right customer.

Have you had any experience with CloudFlare? Please share your experience with us, positive or negative, in the comment section below!

Share on Facebook0Tweet about this on TwitterShare on Google+0Share on StumbleUpon0Share on LinkedIn0

,

About Derek Eatough

Derek Eatough is a professional computer programmer and web developer from Winnipeg, Canada, and is the author of this site.
No comments yet.

Leave a Reply