Monday, September 12, 2011

What is Azure CDN? Azure Content Delivery Network

As name implies, it is network for delivering the contents. It is a group of computers over a network having copy of same data at each computer situated at different locations.
What is network backbone?
Network backbone is the principle data routes in network joined computers. The route over which data flows. It is a part of computer network infrastructure that interconnects various pieces of network, providing path for the exchange of information.

Windows azure CDN has several locations globally. For detailed information about azure CDN location is available here. CDN caches your blob storage information at these locations so as to provide maximum bandwidth and low latency. (Latency – Time required to serve the request). Whenever users make request, the information is delivered from nearest geographical location hence ensuring high availability of the bandwidth and information. This provides better performance for users who are farther from actual location of blob contents storage.

The end result after CDN gives you dramatic change the way application being served and improves user experience drastically. It is completely different than traditional caching that we implement in applications. In traditional caching you cache the information either at IIS level or in azure appfabric; where as in case of CDN data is cached and served from dozens of locations around the globe. This means many user requests don’t even hit the actual blob storage locations (or web servers if you are using CDN for web application).

One important thing here to note is we enable CDN only for STORAGE account. When CDN is enabled for a storage account you receive a domain name with following format –
http:/ /<identifier>
We will use this URL to access the blob storage present in PUBLIC CONTAINER. For example, my container name is “kunalcdncontainer” and storage account name is for example mystorage for which CDN is enabled. Then I can access blob information in following two ways –
1.     Blob -
2.    CDN - http://<identifier>
When request is made using blob storage URL then blob information is directly read from blob storage and information delivered from the actual blob locations only. When request is made using CDN URL, contents of the blob are delivered from closest CDN endpoint geographical location to request made. If blob is not found in CDN endpoint then it is retrieved from the actual blob storage and cached at the CDN endpoint location. For all subsequent request coming from that geographical location will be served from cached CDN endpoint information till the time of expiry. CDN will refresh the cached blob information when time –to-live (TTL) is elapsed. Hence CDN cached blob contents will not be refreshed till TTL expired.
This leads to the conclusion that, CDN cached blob contents will be benefitted from CDN caching only if they are frequently accessed during TTL period.
 As described in this msdn article, the default TTL is calculated as 20% of the interval between the present time and the last-modified time, up to a maximum interval of 72 hours. For example, a blob whose last-modified time was 30 minutes ago will be considered fresh for six minutes in the CDN cache. If this value is specified for a blob, then the TTL period will be set to the value specified in Cache-Control HTTP header.

Steps to “Enable CDN” -
Enabling windows azure CDN is very easy and can be completed in very few steps.
First navigate to Azure Management Portal. Sign in with windows Live ID credentials if required. In the management portal, select “Hosted Services, Storage Accounts & CDN” option followed by CDN tab in left hand panel. In the ribbon click “New Endpoint”.

A pop up will appear, where you need to specify the storage account for which you want to enable CDN caching under textbox labeled as “choose a content provider”. Check the option labeled as “Enable CDN” and rest keep as it is and then click OK.

A pop up message will appear, click Close to confirm that you want to proceed.
Wait till the CDN endpoint is enabled. When CDN endpoint gets enabled, you will see an endpoint URL as shown below –

Windows Azure CDN also provides an option to add domain. “Add Domain” button in the ribbon allows user to add custom domain. Then user can use custom domain name to access contents in Content Delivery endpoint.
When CDN is enabled for blob storage, CDN endpoint will not be available immediately. As per Microsoft documentation, CDN endpoint requires around 60 minutes for change to propagate across all CDN datacenters globally.

Hope above article gives good understanding of windows Azure Content Delivery Network.
Interested in How to use CDN? Click below link -

Happy programming!!!


  1. What is CDN...?? I want to know more about it. Is it for general use or for corporates only?
    content delivery networks

  2. I really love your weblog, Its great to find not absolutely everyone is just posting a ton of rubbish these days!
    Cloud Computing Miami Florida

  3. Hi
    i Read this article its amazing information about CDN Sever Provider and DNS .