On one of my discussions on performance I mentioned in passing the topic of Content Distribution Networks (CDNs) but as a couple of people have emailed me to point out that while they're great at taking the heavy lifting (especially for static pages) they can be rather expensive....

Well, that doesn't always have to be the case...

A few years ago I came across a free experimental Peer-to-peer CDN called Coral running on top of the Planet Lab infrastructure. By the beginning of 2006 their 260 servers scattered worldwide were supporting 25 million requests per day from more than 1 million unique clients and it's still going strong.

What makes Coral so interesting is that while a publisher can choose to use it (simply by appending .nyud.net:8080 to the hostname of the URL they want handled by the network) but if a site is going slow a user can choose to view that site through Coral simply by altering the URL they reference.

So, you could access this site at http://blog.offbeatmammal.com.nyud.net:8080/blogs/obm/default.aspx and automatically get the content delivered via Coral or I could choose to hardcode (say) all my images to be served from that URL in order to reduce the load on my server.

That flexibility makes it very easy to turn on and off as you need to. You can even use an Apache mod_rewrite or similar for IIS to turn it on and off for you (for instance at times of high load off-load all images and static pages to the CDN by activating the URL rewriter) though make sure you check the examples for the re-write rules to make sure you don't get stuck in an endless loop of redirection!

You can use Coral for any sort of content - html pages, images or mp3 files (for instance as Mangatune are doing) - you can get a benefit from fairly frequently changing pages (as long there is value in caching content for at least a few hours) but very dynamic pages are going to need to come back to the server to remain 'fresh'.

Coral is free to use but if you can it would be great to help out on one of their sister projects - Illuminati - by embedding a small code fragment in any pages on your site to help them map the internet. You can help with the illuminati project even if you're not using Coral for content - every site hosting their fragment helps improve the quantity and quality of their data.

Eventually they plan to open up a a true p2p platform so anyone can offer bandwidth and cache space but for now it's supported as a research project.