Content Delivery Network (CDN) is a Windows Azure
blob replication and caching service that makes your blobs available
globally at strategic locations closer to the blob consumers. For
example, if your media-heavy web site has media files centrally located
in the United States, whereas your users are from all the continents,
then there will be performance degradation for the users in distant
locations. Windows Azure CDN pushes content closer to the users at
several data center locations in Asia, Australia, Europe, South
America, and the United States. At the time of this writing, there were
18 locations (or edges) across these continents that provided caching
service to the Windows Azure blob storage via CDN. So, if you enable
your media files on the Windows blob storage with CDN, they will be
automatically available across these locations locally thus improving
the performance for the users. Currently, the only restriction on
enabling CDN is the blob containers must be public. This makes CDN
extremely useful for e-commerce, news media, social networking, and
interactive media web sites.
When you enable a storage
account with CDN, the portal creates a unique URL with the following
format for CDN access to the blobs in that storage account: http://<guid>.vo.msecnd.net/.
This URL is different from the blob storage URL format, http://<storageaccountname>.blob.core.windows.net/,
because, the blob storage URL is not designed to resolve to CDN
locations. Therefore, to get the benefit of CDN, you must use the URL
generated by CDN for the blob storage. You can also register a custom
domain name for the CDN URL from Windows Azure Developer Portal.
To enable CDN on a storage account, follow these steps:
You can use the CDN endpoint
URL for accessing your public containers. The portal also creates a
record for the CDN endpoint in the Custom Domains list. To create a
custom domain name, you can click on the Manage link for the CDN
endpoint in the Custom Domain list and follow the instructions. I will
cover Windows Azure storage in the next chapter, but I have covered CDN
in this section, because it aligns very well with geographic affinity
capabilities of Windows Azure.
Go to your Windows Azure Developer Portal storage account.
Click Enable CDN on the storage account page, as shown in Figure 1.
Figure 1. Enabling CDN