How to enable CDN optimizations
Warning
Azure Media Services will be retired June 30th, 2024. For more information, see the AMS Retirement Guide.
To get the best performance from streaming endpoint CDN, you may want to change the way it behaves based on certain conditions. This article covers how to use the Azure portal and the CDN Rules Engine to adjust the behavior of a CDN profile.
Prerequisites
- Read the article Scale Streaming with a CDN to understand how CDN caching works.
- A Media Services account with at least one streaming endpoint.
Create a streaming endpoint
If you don't want to use the default streaming endpoint, you can create a new streaming endpoint:
- Sign in to the Azure portal.
- Navigate to the Media Services account you want to use.
- Select Streaming endpoints.
- Select + Add a streaming endpoint. The Create a streaming endpoint screen will appear.
- Enter a name into the Streaming endpoint name field.
- Select either the Standard or Premium radio button for the streaming endpoint type.
- Select either the Yes or No radio button for starting the streaming endpoint after creation.
- Under the Content Delivery Network section, select Premium Verizon from the CDN pricing tier dropdown menu.
- Select the Select existing radio button to select the CDN profile.
- For CDN Profile name, the AzureMediaStreamingPlatformCdnProfile-PremiumVerizon profile should already be selected.
- Add tags if needed.
- Select Create. Once the streaming endpoint has been created, it will show up on the list of streaming endpoints.
Add conditional rules for a Premium Verizon CDN
From the streaming endpoint screen:
- Select the new streaming endpoint from the list.
- In the CDN card, select the AzureMediaStreamingPlatformCdnProfile-PremiumVerizon profile. The Profile screen will appear.
- Select Manage. A CDN origin management page will open in a new tab or window in your browser.
- From the menu, select HTTP Large > Rules Engine V4.0.
- Select + New to create a new draft.
- Enter a name into the Draft Name Required field.
- Select Continue. The Rule Builder screen will appear.
- Select +Rule. Rule 1 interface will appear.
- Give the rule a description in the Rule Description field (optional).
- Select + > Match.
- Create the conditions of the rule using the drop down menus. For example:
- If General + Always
- Feature
- Specialty + Streaming optimization
- Feature
- If General + Always
- Select yes to enable the rule.
- Select Save.
Get help and support
You can contact Media Services with questions or follow our updates by one of the following methods:
- Q & A
- Stack Overflow. Tag questions with
azure-media-services
. - @MSFTAzureMedia or use @AzureSupport to request support.
- Open a support ticket through the Azure portal.