First version of Free CDN WP plugin released!

Office life has its advantages and disadvantages. On one hand, it keeps me so exhausted and leaves me so little free time for other hobbies - I’m talking about my books, my December Flower guitar self-training, my photographic stuffs etc. On the other hand, it does improve my knowledge and skills with all those working requirements.

I’m rather lucky to be working as an R&D guy in my current company, thus got a (legal) chance to (legally) spare a lot of time for (sometimes illegal) new and cool stuffs. Among them is CDN, a solution to distribute (mostly static) contents across a network and let end-user access their copies from the cloud instead of the central server itself, thus reduces bottle neck problems during peak hours. To enterprise websites like those of Microsoft, Yahoo, Amazon, eBay etc., this is vital, as the number of concurrent visitors and downloads very frequently exceeds millions. Some of them build their own CDN, when the others rather hire third party services to handle the load to save time and money. Most well known among these 3rd services are properly Akamai and Limelight, though there is a vast of them, naturally. For instance, Windows 7 downloads (~2GB each!) were served through Akamai network, when the live internet broadcast of Barrack Obama’s inaugural speech was done with help from Limelight.

CDN’s are great as they save websites from heavy loads thus reduces bandwidth and shorten that number on the webmasters’ monthly bills. So why aren’t they used so popularly? Well, because in general they are expensive, as you can tell. Depending on each CDN’s price table and the data size, the cost of using a CDN may range from thousands a month, which is unaffordable for like 98% of our blog owners despite of being just a peanut to Yahoo and Microsoft. So unless he is earning millions from selling Photoshop brushes or Google ads on his personal blog, a blog owner would close his eyes and wait for that Digg wave to calm down instead of (dare) using a CDN and survive the typhoon. So the rich keep getting richer and the poor keep remaining poor, life is bitter huh?

Not really (whoo hoo!). Akamai and Limelight are big, but they are not the only. Aside of those commerical CDN’s, there are some free ones, like Coral, which provide us with free CDN - means free bandwidth. Coral CDN uses peer-to-peer technology in its CDN architecture, thus eliminates the need of maintaining a system of expensive server clusters while still offering an CDN solution with acceptable speed and stability. Long story shot, we small blog owners can also have CDN (on pair with Microsoft, yay!).

It’s dead simple to get a content (being any of types, but most commonly static contents like images, video clips, music tracks, css, java scripts) served thought Coral. All you have to do is appending to the host name of that content’s URL and call it done. Try it here, here, and here to see it yourself. The first time requested, the content is retrieved from the original server and cached on Coral’s distributed servers. From the second request on, visitors will get a copy of that content from Coral. If the content weights 100KB in size, you’ve just saved 100KB bandwidth. If you have 1000 requests, it’s 100MB of bandwidth saved. Piece of cake.

So I was very excited getting to know about Coral and free P2P CDN’s. Then I told myself: ok, it’s time for another WordPress plugin - a “Free CDN” one which will rewrite all static URLs (being images, css, js etc.) to take advantage of Coral. Easier said than done, but nonetheless, I managed to get it done (thank you very much Thaya, for the great help on how to capture the whole WordPress HTML stream). Today is the day Free CDN WordPress plugin is born, cheers! The concept behind this plugin is simple: it looks for static contents inside a WordPress page and rewrites them into Coral-ready format. For example, will be rewritten into and gets handled by Coral network.

If your blog is rather small and you don’t have to worry about bandwidth fee / peak times, then it may be not worth your time to lay an eye on this plugin. But if you have a big enough blog with tens of thousands of views a day, and the bandwidth fee is giving you some good nightmare, and the bottle necks are causing you some headaches, then why not give Free CDN a try?

  • What would it take to write the FREE CDN plug-in to support other CDNs?  Basically, I’d need the ability to specify a specific host/CNAME.  Then it would re-write the URLs with that “pre-pend”.
    Example:  Current url  I would want the static content to be  something like that.  Contact if you think this could be done?

  • Hi Mike, it can be done ;)

  • Great!  Is that something you’re willing to add to the plugin?  I have an immediate need for it.  Thanks!

  • Actually I’m not very sure that adding such a feature is suitable for this plugin. As you can tell from the name, it’s for free CDNs (starting with Coral) only. Also I don’t know if your case (prepending a “static” prefix) is common - you know, a plugin should serve majority’s purpose.

  • I’ve had a lot of experiences with CDNs.  Usually to implement one, you simply need to specify a URL which is a CNAME that points to a CDN host.  So as long as the plug in allows you to specify a host, then it could be used with just about any CDN.
    So it wouldn’t necessarily need to be called  It could be anything.  The issues I’ve had with using CMS like WP or Joomla, is it makes it very difficult to use a CDN with them.  You’d have to manually embed pieces of content.
    With your plug-in one would simply specify the type of content (jpg, css, js, ect) and then specify a “pre-pend url” that would work with the CDN.  I imagine you’d be able to sell a plug in like that.
    Let me know your thoughts.
    - Mike

  • Hi Mike, please check your email.

  • You’re welcome and congratulations on your new plugin!  I have a question though.  What’s the benefit of this versus using htaccess? (

  • Hi Thaya,
    At first site the only major different is that my plugin only applies rewriting on static contents. Apart from that, imo using a plugin is always safer (and sometimes the only choice) than touching .htaccess. In the future I will add some more features too.

  • Just wanted to thank you for this plugin.  I’m using it on my WordPress plugin and after a bit of tweaking it’s working great!

  • How would the plugin affect SEO if at all?

  • Hi, actually I don’t think this affects SEO, as it only rewrites static contents such as javascript, css, and images. The most important thing for search engines is always the content, which is plugin-independent.

  • I doubt it will affect SEO.  The HTML is still coming from  Your TAGs and content will still show.  The only thing this plug-in is doing is loading images, js, css files from another location.  If you use SiteMap.xml files, then google, bing, yahoo etc will still index your site properly.  The text on the page will still be searchable by the search engines.
    - Mike C

  • Great!  Is that something you’re willing to add to the plugin?  I have an immediate need for it.  Thanks!

You can follow any responses to this entry through the RSS 2.0 feed.