Azure Content Delivery Network (CDN) - A Walk Through

Introduction

This post is going to walk through Azure Content Delivery Network (CDN). Before we go deep into Azure CDN, it is recommended that you must know what a CDN is and what is the use of a CDN. So, let’s go and try to answer those questions.

CDN

In our day to day life, we all open websites many times. How fast do you get responses from those sites? Some might load very fast, others may be slow; have you ever thought why there is such a huge delay in giving responses? There are a lot of possible reasons behind it. Here, we are going to discuss about one reason and a solution that we can do, that is, CDN. With the help of a CDN, we can reduce the physical distance between user and our website server, and we can cache our images and other content, so that the content can be serched quickly.

Azure CDN

Azure CDN caches all the static content that you have in your website, in different locations. Using an Azure CDN, you can reduce the number of round trips for getting the required content, hence we get better performance and User Experience.

Image Courtesy: Microsoft Docs

Advantages of having an Azure CDN are listed below.

  • Better performance for your apps and services
  • Global distributed network
  • Highly scalable infrastructure
  • Active redundancy and failover
  • High reliability
  • Robust security

Creating an Azure CDN

To create a CDN, you must log into https://portal.azure.com/ and then click on the New icon.

Azure Create New Resource

Now, search for CDN.

Our next step is to create the CDN profile. To do so, you must fill the form according to your preferences.

Please be sure that you are checking your price tier and, as per your needs, you can select one. Here, I am selecting S1 Standard Verizon.

As we have created our CDN Profile, now it is time to create an End Point. Navigate to your CDN profile and click on the End-Point.

End-point Option in CDN

You must add the required data in the upcoming Add an endpoint form. Here, name is the name of your CDN endpoint that will be created as .azureedge.net.

Once you are finished, you can see that your CDN endpoint is in running state.

Creating a Custom Domain

We have successfully created an Azure CDN, but is that really over? For some people it is, but for others it is not. Let’s see why. We have an option to add a custom domain for our CDN, that’s cool right? If you noticed well, we have created a CDN. Here in this step, we are going to see how we can get a custom domain for our CDN.

To start with, login to your Azure Portal and browse for the CDN profile we have just created. Click on the endpoint to which you want to map your custom domain.

Custom Domain Option in CDN

Now, log into your Domain Registrar’s website and navigate to DNS records (If you could not find DNS records, search for Domain Name or Name Server Management). Here I am using BigRocks, and the screenshots may be different for other service providers.

Manage DNS in BigRock

Navigate to the CNAME creation page, please check in advanced settings if you could not find it in default settings page. And fill the required fields.

NAME Creation in DNS Window

Now, go back to Azure portal, and give the custom domain name we created in the DNS Management Settings, in the Add a custom domain form.

Adding Custom Hostname

Click Add. If everything goes fine, you will get a notification as preceding.

Please be noted that the verification process may take a few minutes or a few hours. If you are sure that the CNAME configuration is correct, please wait some more time and check if you are getting any error.

That’s all for today. I will write another article which explores Azure CDN more. 

Conclusion

Did I miss anything that you may think is needed? Did you find this post useful? I hope you liked this article. Please share with me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, drop your questions here and I’ll definitely try to help if I can.


Similar Articles