Website performance is a big deal. Experiments conducted by the biggest websites on the net conclude page performance is directly related to revenue. Bing.com found a 2 second slow down equals a 4.3% reduction in revenue per user. A 400 millisecond delay on Google search pages led to 0.59% fewer searches per user. Aol found users who experience the fastest Web page load times view 50% more pages per visit than users experiencing the slowest page load times.
Content Delivery Networks (CDN) can be a big boost in page speed by 1) saving a copy of the fully-rendered page and 2) serving that copy from a server as close to the user as possible. Big CDNs like Akamai and CacheFly charge hundreds of dollars a month at the minimum. CloudFlare, a new start-up, is hoping to change that by offering a CDN for free. I tried it out with two of my sites, this blog and dummyimage.com, and below are my findings.
Setting up CloudFlare with my sites was a breeze. All you have to do is change some DNS settings to route your traffic through their servers. Since I use Dreamhost as a host, CloudFlare made it even easier by hooking into Dreamhost’s system to make the changes for me. An e-mail with the original DNS settings was also sent as a backup in case I wanted to revert back. Within 5 minutes, I was up and running.
Dummyimage.com saw the most benefit from CloudFlare as it serves up dynamically generated images. Once that image was cached, any subsequent requests for that URL would be for a static image without needing PHP to create it. Dummyimage is popular and the reduced load on my measly shared servers was noticeable.
CloudFlare provides a bunch of stats for monitoring the amount of traffic going through their network as well as the bandwidth saved. In my case, for both of my sites, I’ve saved 11.5 gigbytes of bandwidth on 23,985,639 requests in 14 days.
Another advantage of CloudFlare is the security aspect. The network will identify and block threats ranging from botnet zombies to web spammers. CloudFlare presents suspected threats with a captcha and a chance for the user to leave a message if they might have been falsely accused. Part of their stats lets you see all of the threats including ones that passed the captcha and/or left a message. So far I have seen no false positives.
So while things have been mostly great, there are a couple of drawbacks. For one, the service is still figuring things out. There was about 50 minutes of downtime when all sites running through CloudFlare were inaccessible. It didn’t irk me too much. I figure I can’t really complain when the price is free. Another issue is the stats take forever to load. The stats for the free version are delayed 24 hours on purpose, but several times when trying to access the statistics dashboard the site would timeout.
Because all of the traffic is now coming from the CloudFlare servers, any code on your end that relies on the IP address of the end user will need to tweak their code. CloudFlare has a simple guide for how to do this on their wiki.
So if you’ve made it this far you’re probably wondering, “should I run my site through CloudFlare?” If you run a personal site and can live with a little downtime here and there, then absolutely. If your site is your sole means of income and any downtime causes your blood to boil, then you should probably find a more trusted CDN (and expect to pay for it). You could always experiment with it over the weekend for a couple of days and then switch back if you run into problems.
Content Delivery Networks bring a big performance boost to a site and with a free one out there like CloudFlare, there’s no excuse to not be using one.