This post was brought to you by Kumar Allamraju.
In one of the prior episodes we learnt how to serve a static website from Azure's blob storage. This is great for a low volume web site. As your site starts getting more hits, you wanted to deliver the content closer to the end user. In this episode, we will learn how to deliver a static content via Azure Content Delivery Network(CDN).
Azure CDN offers developers a global solution for rapidly delivering high-bandwidth content to users by caching their content at strategically placed physical nodes across the world. Azure CDN can also accelerate dynamic content, which cannot be cached, by leveraging various network optimizations using CDN POPs. For example, route optimization to bypass Border Gateway Protocol (BGP).
The benefits of using Azure CDN to deliver web site assets include:
. Better performance and improved user experience for end users, especially when using applications in which multiple round-trips are required to load content.
. Large scaling to better handle instantaneous high loads, such as the start of a product launch event.
. Distribution of user requests and serving of content directly from edge servers so that less traffic is sent to the origin server.
This article assumes you have already setup a static web site using Blob storage. Pls refer to tip 138 to host a static website with Azure's Blob Storage.
Pls make a note of your Primary Endpoint from your Storage Account >> Settings >> Static website page e.g. [azuretipandtrickstorage.z5.web.core.windows.net]
Go to your storage account and select Azure CDN under the Blob service section. Configure the CDN end point.
This process may take couple of minutes to provision the CDN end point.
Go to your Azure Portal's home page and find the "CDN profiles" blade and click on the CDN end point. Make sure the CDN endpoint is in "Running" status. Copy the endpoint URL and paste it in your browser.
Copy the highlighted URL from the above screenshot and open it in your browser.
Depending upon the end user's location, the static content may take little longer to load as the content needs to be fetched from the origin server. Subsequent access to this image/page will be much faster as the content is served from the edge servers(CDN)
A full-walkthrough is located below:
Public Cloud services require reliability, scale, agility and performance. Azure CDN delivers an easy to setup and use CDN platform to distribute your videos, files, web sites or other HTTP content to the world. With CDN services from Verizon, Akamai and now Microsoft, Azure CDN is built from the ground up to deliver best in class CDN services through our multi-CDN ecosystem all inside Azure’s flexible cloud service. Azure CDN provides customers the ability to deliver content from Microsoft’s own global CDN network. In this episode, we learned how easy it is configure Azure CDN with Azure Blob Storage. Go and try it out!