Updated July 7, 2023
Introduction to CDN in Azure
The following article provides an outline on CDN in Azure. It is a global solution for a content delivery network(CDN) with low latency for delivering high bandwidth content. Azure CDNs use a distributed network of servers to deliver high bandwidth content, and it caches the content of users and stores the content on servers closest to the end-users, which helps reduce latency. Azure CDN mostly uses caching to improve performance by some dynamic data. Azure won’t be able to cache and store to endpoint because CDN uses various network optimization on POP (point-of-presence of server) to accelerate dynamic content.
How to Create CDN in Azure?
Content delivery networks help store video files in edge servers so global users can access the same.
Pre-requisites:
Need an Azure account with a valid email address and password; you also need an Azure subscription to use Microsoft Azure storage.
Step 1: Sign in to the Microsoft Azure Portal using the below URL.
Below Azure Home Page will be opened:
Step 2: Select Create a resource from the Azure portal home page; it will show the page with all the services as below:
Step 3: Select Web App from the New page of the portal.
Step 4: Select CDN from the newly populated featured pane as below.
Step 5: CDN Profile page will be opened; provide the CDN name as you desire also select Resource Group and Pricing tier from the dropdown.
Do not check the Create a new CDN endpoint now checkbox.
Step 6: Click on the Create button; it will take some time to deploy, and validation will start as below.
Step 7: After successfully creating the CDN profile, the notification icon message displays as “Successfully created a CDN profile”.
Step 8: Click on the Successfully Created a CDN profile from the Step 7 page to display your created CDN profile.
How to Create CDN for Custom Origin in Azure?
Microsoft Azure CDN supports four types of origin types as below:
- Storage
- Cloud Services
- Web App
- Custom Origin
Here we will see how to create a CDN for Custom Origin, which is nothing but an origin web browser for public access which can be hosted in Azure or Anywhere.
Step 1: Go to All Services, select Web from the left pane, and click on CDN profilers to check recently created CDN profiles.
Step 2: CDN profiles page displays all the CDN profiles created; select one of the CDN profiles as below.
Step 3: Select + Endpoint From the CDN profile pane as below.
Step 4: Enter your desired endpoint name in the Add an Endpoint.
Step 5: Origin Type is a drop-down list that displays all four origin types; here, select origin type as Custom origin.
Step 6: The origin hostname field takes the URL of the custom link or the IP address, and it will pull the content from the origin, do not use https/http or any trailing slashes in the URL of the hostname.
Step 7: Click on Add it takes around 8-10 minutes to create an endpoint for the custom origin, and in the notification, icon notification will display as “Successfully created the CDN endpoint”.
Click on Successfully created the CDN endpoint to navigate to the endpoint.
How to Manage CDN in Azure?
Here we will see how to manage the CDN Azure to control content delivery.
Step 1: Go to the CDN you want to manage, and select CDN profile from All Services page.
Step 2: Select the CDN endpoint you want to manage. It will open a CDN endpoint from the CDN profile.
Step 3: Select the Geo-filtering option from the Setting section; this setting will allow you to control the filtering based on location. It has two options Configure to allow or block.
Step 4: Based on country code, users can manage which country to block and which country to block the content.
Step 5: To manage Compression, select Compression under the Setting section as below.
Based on requirements, users can keep the compression configuration on or off. There are several other compression checklists provided for users.
Step 6: To manage the cache in the CDN, under-setting section, click on Caching rules which helps to control the content.
Step 7: Cache setting is provided with the three different queries caching behavior as :
- Ignore Query Strings
- Bypass caching for query strings
- Cache every unique URL
Based on the requirement user can set the content caching behavior.
Advantages
Microsoft Azure Content delivery network offers many advantages to the user to deliver content globally:
- It reduces the latency to provide high-bandwidth content.
- Azure CDN offers an improved user experience and high performance using an application that loads content repeatedly.
- It has high scalability to handle large volume data loads.
- It stores the content on the edge servers near the user and provides a content directory to the user with less traffic.
Conclusion
In conclusion, we learned how Microsoft Azure handles content delivery on a global level. CDN helps to share web-based content on a global level, and using CDN endpoint, users can manage which country or location data can be accessed and also has the option to host data on a custom origin domain.
Recommended Articles
We hope that this EDUCBA information on “CDN in Azure” was beneficial to you. You can view EDUCBA’s recommended articles for more information.