Use the Azure Content Delivery Network

The Azure Content Delivery Network provides developers with solutions for delivering high-bandwidth content via caching static content in storage blobs, cloud services, and websites on the Azure platform by using a large number of physical nodes distributed across China.This network also currently supports the use of source stations that have not been deployed on the Azure platform.

This task includes the following steps:

The advantages of using the Content Delivery Network to cache Azure data include:

  • Better performance and user experience for users of apps with distant content sources that require the use of multiple internet journeys to load content.
  • Large-scale distribution that enables the system to cope better with transient high loads (for example, at the start of events such as product launches).

Existing Azure customers in China can now use the Content Delivery Network in the Azure portal. If you need to enable HTTPS acceleration, please refer to Azure CDN HTTPS Acceleration Service.

Step 1: Create a storage account, cloud service, web application, or media service

You can create Content Delivery Network endpoints for storage accounts, cloud services, web applications, or media services in existing Azure subscriptions.You can also create new storage accounts, cloud services, or web applications for use in Azure subscriptions according to the following methods:

Create a storage account for Azure subscriptions

Refer to How to create a storage account

Create a cloud service for Azure subscriptions

Refer to How to create and deploy cloud services

Create a web application for Azure subscriptions

Refer to How to create and deploy web applications

Create a media service for Azure subscriptions

Refer to How to create and deploy media services

Step 2: Create a new Content Delivery Network endpoint

After Content Delivery Network access for storage accounts, cloud services, or web applications is enabled, all publicly available objects are entitled to access the Content Delivery Network edge cache.If you edit an object that is currently cached in the network, the new content will be accessible only via the network after the time to live (TTL) expires and the object’s content is updated (or after a manual refresh is performed by using the advanced management features).

Create a new Content Delivery Network endpoint

  1. In the navigation pane of the Azure Portal, select CDN.
  2. In the function area, select Create New.In the Create New dialog box, select App Services > CDN > Quick Create.

    Content Delivery Network Quick Create

  3. In the Subscriptions drop-down list, select the Azure subscriptions you want to use (if there are multiple subscriptions).
  4. Select the acceleration type in the Acceleration Type drop-down list.The types of acceleration currently supported are Web Acceleration, Download Acceleration, HTTP VoD (Video on Demand) Acceleration, and Live Streaming (Video Direct Broadcast) Acceleration.
  5. In the Origin Domain Type drop-down list, select Cloud Service, Storage Account, Web App, Media Service, or a customized origin domain.
  6. In the Origin Domain drop-down list, select the endpoint that was used to create the network from the cloud service, storage account, web app, or media service list.If the selected Origin Domain Type is Customized Origin Domain, enter your own origin domain address under Origin Domain.
  7. In Custom Domain, enter the customized domain name you want to use (for example, cdn..com).
  8. In Origin Host Header, enter the return-to-source access host header that your source station accepted.After you enter the custom domain, the system automatically fills in a default value based on the origin domain type that you selected.To be more specific: If your source station is on Azure, the default value is the corresponding source station address.If your source station is not on Azure, the default value is the custom domain that you entered. Of course, you can also modify this value based on the actual configuration of your source station.
  9. In “ICP No.,” enter the ICP record No. that corresponds to the custom domain name entered in the previous step for example, Beijing ICP record No. XXXXXXXX-X).
  10. Click Create to create the new endpoint.
  11. After you have created the endpoint, it appears in the list of subscribed endpoints.The list view shows the custom domains that are used to access cached content, as well as the origin domains.

The origin domain is the original location of the content that is cached on the CDN.Custom domains are URLs that are used to access Content Delivery Network cache content.

Note The configurations created for endpoints cannot be used immediately. See the following notes:

  1. To ensure that the custom domain name and ICP number that you entered match and are valid, you must first review them.This process can take up to one working day to complete.
  2. If the details do not pass the Internet Content Provider (ICP) review, delete the Content Delivery Network endpoint you created, and then create a new endpoint by using the correct custom domain name and ICP number.
  3. If the details do pass the ICP review, the CDN service will be registered within 60 minutes, so that the network can propagate it.At the same time, you also need to configure the CNAME mapping details, as indicated by the notifications in the interface, before the cache content can finally be accessed via the custom domain name.

Step 3: Access content in Content Delivery Network

If you want to access content that’s cached on the network, do so by using the custom domain name you provided in Step 2.The addresses of cached blobs are similar to the following address (using the example from Step 2):

http://cdn.yourcompany.com/<myPublicContainer>/<BlobName>

Step 4: Delete content from the Content Delivery Network

If you do not want to continue to cache objects in the Azure Content Delivery Network, any one of the following steps can be carried out:

  • For Azure blobs, delete the blob from the public container.
  • Generate a private container to replace the public container.For more information, see Restricting access to containers and blobs.
  • You can use the Azure portal to ban or delete Content Delivery Network endpoints.
  • You can change the cloud service to a request that no longer responds to this object.

Objects already cached in Content Delivery Network will remain in a cached state until the TTL for the object expires.After the TTL expires, the network will check to see whether the endpoint is still valid and whether anonymous access to the object is still possible.If the object cannot be accessed, it will no longer be cached.

Step 5: Use advanced management features

After you have created a new Content Delivery Network endpoint, you can use the Azure portal to check the basic configuration details and perform other basic operations, such as banning or enabling and deleting network endpoints. You can also click the Management button to jump to another management page, where you can use the advanced management functions, as shown here:

Manage button

Note. You will be guided to another Content Delivery Network management page, which is not the part of Azure portal. (Ensure that you allow your browser to open the new windows.)

The advanced management interface

This advanced management interface provides features including “Overview,” ”Domain name management,” “Traffic report,” “Bandwidth report,” “Cache refresh,” “Content prefetch,” “Log download,” and “Service check.”For specific methods of using and configuring the interface, select to enter the corresponding function modules, and then read the corresponding help files.You can also open the help files directly via the left navigation bar.