Cloud

Speed up smaller websites by migrating them to CloudFlare Free

The content delivery network CloudFlare offers a free tier for smaller websites that do not require advanced features. Learn how websites can benefit by signing up for CloudFlare Free.

CloudFlare cofounder and CEO Matthew Prince
Image: CloudFlare

With the ubiquity of low-cost virtual private server (VPS) offerings from a variety of vendors, anyone with a working knowledge of Linux, PHP, and MySQL — or a proprietary automated system such as cPanel with Softaculous — can create a website using popular software packages such as WordPress, Joomla, or phpBB, among others. Going this route, rather than having your content remotely hosted and managed by ad-supported services like Google's Blogger, allows the user to have much more control over the software that manages their website.

The issue with this strategy is that these low-cost VPS offerings struggle to perform under heavy load. The aforementioned software packages all rely on MySQL, which is typically resource intensive. If a sudden influx of users visits a website hosted on a relatively minimalist, low-cost VPS that uses a script that runs an SQL query for page generation, the server will ultimately buckle under the pressure and serve error pages instead of the intended content, resulting in circumstances such as the "Slashdot effect," or the "Reddit Hug of Death." Of course, turning away potential visitors is never a good solution, but neither is potentially spending hundreds of dollars to buy up capacity for edge case traffic spikes.

Why a CDN is a good idea

Naturally, this is the perfect use case for cloud technology. By putting your VPS behind a content delivery network (CDN), it will substantially lighten the load on the server — allowing it to focus on running the software that powers your website. The task offloaded into the cloud is the transfer of the page content, including images, JavaScript, and other linked media, to the end user viewing the page in their browser.

With a CDN, instead of having all users connect to one centrally located server, users connect to a geographically nearby server, which can greatly improve page load times for users geographically far from the origin server — a particular concern for Australian users. CloudFlare's network consists of 34 data centers, which are spread across every continent except Antarctica.

CloudFlare does more than cache and forwarding, however; CloudFlare is able to remove unnecessary whitespace from HTML pages, reducing the file size. Other optional optimization services include bundling multiple included JavaScript files into one to reduce the number of GET requests being sent to the server. According to CloudFlare, a website accelerated by that service "loads twice as fast for its visitors, sees 65% fewer requests and saves 60% of bandwidth."

SEE: CloudFlare's Michelle Zatlyn: Co-Founder. Cloud Pioneer. Limo Driver.

How to migrate your website to CloudFlare

Migrating your website to the CloudFlare Free tier is quite easy — there are no changes to be made or programs to be installed from the server side. Simply sign up for the service and enter the domain names you wish to have covered by CloudFlare.

After clicking through two screens to decide what options you want to start with (you can turn on or off the aforementioned speed enhancement features here), the CloudFlare configuration manager will direct you to change the DNS records for your website at your domain registrar. The configuration instructions for various registrars are included, with screenshots added to walk users through the process of changing DNS settings. These instructions are quite up to date — the information presented for my registrar (DD24 / Key-Systems GmbH) was accurate for the latest revision of its user control panel.

Additional security benefits of CloudFlare

CloudFlare also provides protections against a variety of threats. It proactively scans HTTP headers to see if they match the fingerprint of content scrapers and actively malicious scripts. Additionally, it provides a simple interface for blocking individual IP addresses, or IP ranges from accessing the website.

CloudFlare ranks IP addresses with a threat score, using information sourced (in part) from sources such as Project Honey Pot, and will — depending on the score — either request the user to complete a CAPTCHA or block them outright for being malicious users.

What's your view?

Do you use a CDN to accelerate the speed of websites you manage? If so, is that CDN CloudFlare? How has the use of a CDN impacted the amount of bandwidth transferred out from the main production server? Share your experiences and thoughts in the comments.

Also see

Note: TechRepublic, ZDNet, and Tech Pro Research are CBS Interactive properties.

About James Sanders

James Sanders is a Java programmer specializing in software as a service and thin client design, and virtualizing legacy programs for modern hardware.

Editor's Picks

Free Newsletters, In your Inbox