Use a CDN to Accelerate Your Site

John T. Mills
John T. Mills
Use a CDN to Accelerate Your Site

Content Delivery Networks

Azure offers a CDN which is simple to deploy. It does have a lot of premium features, and those can be complex. In this article we will unpack a standard setup to enable our static storage website using a google registered domain.

Create an Azure account

  1. Using a web browser, navigate to the Azure Portal at http://portal.azure.com.
  2. If you have an account, sign in. If you don't have an account, Click "Create one!". The follow the sign up process. example image

Create a CDN Profile

  1. Using a web browser, navigate to the Azure Portal and sign in, if you aren't currently signed in.
  2. From the Azure portal, select the Search resources, services, and docs text window and type "cdn". example image
  3. From the search results find "CDN profiles" and select it. example image
  4. From "CDN Profiles" select "Add". example image
  5. Fill out the "CDN Profile" form. example image
    1. Define a CDN profile name.
    2. Pick your subscription, the defualt is likely correct.
    3. Name a Resource group (folder) that all of your resources will go inside.
    4. Pick a pricing tier. "Standard Microsoft" is what we will need for this exercise.
    5. Select "Create".
  6. Once submitted with the "Create" button, the deployment will begin. When the deployment finishes, click "Refresh". example image
  7. Click on the new profile, when it appears in the CDN Profile listing.

Create a CDN Endpoint

  1. From the CDN profile, select "Endpoint" example image
  2. Fill out the "Add an endpoint" example image
    1. Pick a host name for the azureedge.net domain. It has to be unique, but it doesnt have to be pretty.
    2. Select Storage static website as the origin type.
    3. Select the primary endpoint from your storage account that is hosting the static website as the origin hostname.
    4. Verify the Origin host header matches the Origin hostname.
    5. Ensure HTTP is enabled.
    6. Ensure HTTPS is enabled.
    7. Set the web optimzation to General web delivery.
    8. Select "Add".

Conclusion

Now you have a CDN frontend for your website, hosted in Azure, but there's still configuration to be done. I'll cover those tasks in detail in a future post.