There are many things that make a webpage load quickly and the most difficult of which is serving static content from a content delivery network or CDN. There are two free CDN that I know of.
The Coral Content Distribution Network
Coral CDN is a free peer-to-peer like CDN. It has a huge network, with over 260 servers world wide it’s larger than most commercial CDNs. Using Coral CDN is as easy as appending .nyud.net to the hostname of any url and that request will be served by the Coral CDN. So if you had image on your site like so:
<img src=”/images/some_large_image.jpg” />
It would become:
<img src="http://www.example.com.nyud.net/images/some_large_image.jpg" />
Just for fun the image of the map is being served from in this way. For a site that features many large images or other static content using Coral can save tons of bandwidth and the request will be served from the closest server has the content in its cache. Unfortunately because of the volunteer nature of the system only the most popular content is widely distributed so often loading something from Coral actually takes longer than the origin server. Running a few tests with webpagetest.org shows that web pages from Coral CDN can take as much as twice as long to load. (test of nnucomputerwhiz.com vs test of nnucomputerwhiz.com.nyud.net)
Coral has other downsides besides speed since it is basically a proxy f0r any website many content filters and security software block the nyud.net domain rendering anything served using Corel inaccessibly. So some users that are behind a company firewall might just see broken jpegs.
Pros:
- Just requires changing url
- Save on bandwidth and server load
Cons:
- Can be slow
- Restricted by content filters and security software
CloudFlare CDN
CloudFlare is a service that just launched in October that provides acceleration and protection for any website by simply changing the name server for the domain. They offer a free service and a pro service but most of the features that would benefit are in the free service, the only major thing it is lacking is SSL support which would be a necessity for any ecommerce site.
On their site they claim a website on CloudFlare …
… loads 30% faster
… uses 60% less bandwidth
… has 65% fewer requests
… is way more secure
with just their free service. I have tried CloudFlare with my site anydogbreed.com and have found these numbers to be pretty accurate. They also claim that setup takes about 5 minutes and that is pretty close to how long it took me.
First CloudFlare scans your existing DNS configuration and tries to copy it so nothing will change when the name server switches. It lets you review it first and in my case it got everything perfectly. Then it lets you choose which subdomains will be served by CloudFlare and which ones will be sent directly to the origin server. By default the root domain anydogbreed.com and www.anydogbreed.com where setup with CloudFlare and all the others ftp.anydogbreed.com, ssh.anydogbreed.com were set as direct. This was exactly how I wanted it setup so I didn’t have to change a thing. Next I updated my nameserver for the domain at my registrar and then it was done.
After about a week of using it my traffic hasn’t increased but it hasn’t gone down either.
As you can see CloudFlare gives some pretty good stats and even picks up on crawlers/bots which javascript based tackers like Google analytics don’t. According to the stats roughly half of the requests to the site were handled by CloudFlare so the are living up to their claims.
My experience with CloudFlare has been great and I plan on switching my other sites over to it and doing some more benchmarking. Some other reviews on the net have reported problems with reliability and functionality of their sites after switching. Particularly right after updating the DNS the site was unavailable for a few hours. Another user reported problems with their vBulletin forum system after switching. Some users were unable to make new posts. So CloudFlare might not be best for highly dynamic webpages, although they claim their system automatically determines the nature of a page and if it should be cached.
Pros:
- Just requires changing name servers
- Save on bandwidth and server load
- Prevents attacks from hackers and spammers.
- Good analytics.
Cons:
- Little control over what gets served by the CDN and what does not.
- Not good for very dynamic websites.
- No SSL suppot in free version.
Google App Engine
It is actually possible to use Google’s powerful server infrastructural for your own CDN using their App Engine that they provide for free. The setup can be a little complex but the speed is unparalleled for a free CDN.
- Download the Google App Engine SDK
- Sign up for a free Google app engine account (a valid SMS capable number is required)
- Create an empty directly for your app lets say “/app”
- Create a directory inside /app to hold your static files, say /app/images
- create app.yaml file in the root of /app mine looks like:
application: wizofyendor version: 1 runtime: python api_version: 1 handlers: - url: /images static_dir: images
Deploy or “update” your app with the SDK command. If you’re using python it’s
python appcfg.py update app
where app is the directory holding your application.
Now your files should be located at http://nameofapplication.appspot.com/images/filename.jpg
For your enjoyment this penguin is hosted on Google App Engine:
If you are looking to just host a large javascript library such as jQuery or prototype you can just use Google’s libraries API which lets you do just that.
Pros
- Very fast
- Complete control over what gets served from the CDN
- Supports SSL
Cons
- Difficult to setup
- Limited to 1 GB total storage for free
- Limited to 1 GB bandwidth per day
If I missed a free CDN please let me know in the comments. Also let me know how any of these have worked for you.
Thanks for the CloudFlare mention. A couple of quick points to clarify:
* Little control over what gets served by the CDN and what does not.
(We’re open to suggestions on this.)
* Not good for very dynamic websites.
(Dynamic websites aren’t an issue at all because we don’t cache any dynamic content. Updates would occur as normal).
* No SSL suppot in free version.
We can only resolve the DNS for SSL that we don’t provide directly. You can add the SSL as a subdomain in Settings->DNS settings->Add subdomain->Make sure cloud is gray.
Vbulletin issues:
Since we act as a proxy for sites, our ips would show. Customers would want to install mod_cloudflare (or one of the other solutions in our Wiki) to get original visitor IP returned. More information here: http://www.cloudflare.com/wiki/Log_Files