Yireo - Extensions, tutorials and blog for Magento and Joomla!

Blog Tags

MageBridge Standard

Using EdgeCast as CDN

Saturday, 24 April 2010

With a Content Delivery Network you can deliver content fast and efficient, connecting your visitors to the webserver closed to them. EdgeCast offers such a CDN, allowing you to serve static files like images, CSS-stylesheets and JavaScript. We reviewed a couple of CDNs and here's our review of EdgeCast.

What do you need?

Working with CDNs is a specialism. We recommend that you have knowledge of things like CNAME-records, FTP and SSL-certificates before you start configuring your website with a CDN. We have already created tutorials which help you configuring CDNs for Joomla! and Magento. For Joomla! we have also released a Static Content plugin which allows you to translate Joomla! URLs automatically to CDN URLs.

Configuring the EdgeCast CDN

There are several things you can configure within the EdgeCast dashboard. You can configure a CNAME to beautify the URL under which static content is accessed (for example static.example.com). Also, if you want to serve your static content through HTTPS, there are options to add your own SSL certificate to your EdgeCast domain or your own CNAME-record.

Managing your files in EdgeCast

As soon as your EdgeCast account is setup, it's time to make use of it. While you could upload files manually through FTP and even rsync, EdgeCast offers a much smarter way to upload content automatically: Something they call Customer Origin.

With Customer Origin, you use a specific URL which is constructed like this:

http://EDGECAST/ID/www.example.com/images/test.png

As soon as this image is called for, the EdgeCast server will check whether it already has the file test.png in cache, and if it doesn't it fetches the image from your own site (http://www.example.com/images/test.png). The cached content is refreshed after a specified period, or you can manually clean-up everything (purging).

Changing the paths in Joomla! or Magento

The only challenge is to rename all the paths from the original location in either Joomla! or Magento, to the new path pointing to the CDN. There are various ways to accomplish this: In Magento you can just rename the Base Paths within the System Configuration. But in Joomla!, things are not that easy.

We are currently working on a free Joomla! plugin Static Content, that allows you to rename the default paths pointing to your template-files and/or images-folder, to point to a CDN or static server instead. But besides this plugin, there are various other solutions possible. One of the solutions is to manually rename the paths in your template. We have already released a Joomla! template-helper PHP-class which helps you along with this.

See our tutorial Crunching Joomla! CSS with the Yireo Template Helper for more information.

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo