Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using the Azure Content Delivery Network (CDN)


The Azure Blob service is hosted on a small number of Azure datacenters worldwide. The Azure CDN is a service that enhances end user experience by caching blobs in more than 20 strategic locations across the world (a complete listing can be found at http://msdn.microsoft.com/library/azure/gg680302.aspx).

After the CDN is enabled for a storage account, a CDN endpoint can be used, instead of the storage-account endpoint, to access a cached version of publicly accessible blobs in the storage account. The CDN endpoint is location aware, and a request to the CDN endpoint is directed automatically to the closest CDN location. If the blob is not currently cached there, the CDN retrieves the blob from the Blob service endpoint and caches it before satisfying the request.

The cache-control property of the blob can be used to specify a time to live in the cache. Otherwise, the CDN uses a heuristic based on how old the blob is and caches the blob for less...