Learn about the benefits of adding a content delivery network (CDN) endpoint for your Azure web app. The demonstration explores how to provision and configure the CDN.
- [Instructor] Adding a content deliver network or CDN endpoint to your Azure app service, will cache your web content globally that can then be delivered to users using the maximum throughput available. Let's start by looking at the workflow for the content delivery network. First we have our Origin, which is where our content is hosted. And this could resources such as audio, video or documents, and Azure Web APIs can also be hosted here. These contents are then distributed to the content delivery network endpoints globally.
When the user requests the content, the content is distributed via the CDN endpoint and not the web app. This provides a faster and more robust experience for the user. When using the content deliver network, the static web content is cached locally to the content delivery network endpoints. This provides a lower latency and faster delivery to our users. And it also decreases the server load on that web app itself, because the web app is not hosting and distributing that content.
I've already mentioned a couple of the resources that we can distribute through the content delivery network, but let me run through the whole list for you. We can host images, style sheets, documents, files, client-side scripts, HTML pages, and other content that does not require modification, and that's the trick to using a CDN endpoint. That content must be static. Now let's take a look at how we add a CDN endpoint to our Azure web app. The first thing we'll need to do is actually open up the blade for our web app.
And we're going to continue using the LILWebApp that we created a few lessons ago. And then from here we're going to select Networking. And you will find Networking under Settings, and then Networking. And we can see here that our virtual network has not been configured, we don't have any hybrid connections configured at this point, as well as we do not have any content delivery network endpoints configured. We can go ahead and do that by clicking on Configure Azure CDN for your app. To create the endpoint we're going to go ahead and enter in a name for our profile.
You'll pick the pricing tier, now I'm going to go ahead and take the Standard Akamai for our demonstration. One of the reasons I'm using this for the demonstration is it will provision fairly quickly. Now we're going to go ahead and provide our endpoint name, and then our Orign hostname. And this is actually coming from our web app. I'm going to go ahead and click Create. And this will take a few minutes. In our example it only took a few moments for that endpoint to be provisioned. Your experience may be different, and it could take up to an hour or more.
Once your endpoint is up and running, it will be listed under the hostname and the status should indicate that it is running. I'm going to go ahead and open up that endpoint. At this point in the real world or production environment, you would add in a custom domain. You just click on Add a custom domain, and then add in your custom hostname. And this will create mappings for your custom hostnames to the content delivery network endpoint hostname with your DNS provider. I'm going to go ahead and close that, and finally I want to touch on the Purge option.
The content delivery network endpoint will refresh it's resources from the Origin website based on the time to live or the TTL. And the default TTL happens to be seven days. If you need to refresh the contents of that endpoint before the TTL has expired, you can purge the endpoint. In the content path you would either select All, or only specific content paths to purge and then click Purge. The endpoint will now retrieve the data from the Origin website once again.
To quickly recap, the content delivery network distributes content to your users globally. Providing them much better and faster experience for your users.
Learn the intermediate-level skills needed to design Azure web and mobile apps for any organization, using the Azure Web Apps and Mobile Apps services. Instructor Sharon Bennett, a Microsoft Certified Solutions Expert, covers securing mobile and web apps with Azure Active Directory, creating WebJobs to script tasks such as queue processing and file maintenance, and extending mobile apps with custom code. Plus, learn how to update, back up, and restore your Azure apps.
As an intermediate-level course, an existing understanding of the Azure platform is required. After completing the training, IT professionals will also be better prepared for Azure certification.
- Create Azure web apps
- Create WebJobs
- Using Traffic Manager
- Adding a CDN to web apps
- Updating, backing up, and restoring Azure Web Apps
- Deploying Azure mobile apps