简体   繁体   中英

Azure Media Service track bandwidth used per asset

We are building a video hosting site using Azure Media Services and we want to be able to track the size and bandwidth that has been used per asset/video.

The general user journey is once a user has signed up they can upload their videos, we encode this using AdaptiveStreaming and we have all the encoded assets and we create a new streaming locator for that video.

There are plans to have a subscription model on top of this which has a size and bandwidth limitation. We are able to extract the size from the manifest.json but we want to be able to have some type of event or background job running to periodically track for each asset their bandwidth so we know per user what their total bandwidth usage is for the sum of the videos they have uploaded.

Is this possible per asset, looking at the metrics it seems to be possible per streaming endpoint but nothing I can find on asset/streaming locator.

Looking through the API documentation:

Monitor Media Services metrics and diagnostic logs via Azure Monitor

There are metrics available per the Streaming Endpoint as mentioned above that could be of use to us if it were per streaming locator:

Requests - Provides the total number of HTTP requests served by the Streaming Endpoint.

Egress - Egress bytes total per minute per Streaming Endpoint.

SuccessE2ELatency - Success end to end Latency - Time duration from when the Streaming Endpoint received the request to when the last byte of the response was sent.

Unfortunately, as these are per the streaming endpoint this doesn't allow us to track per asset/streaming locator.

Having now gone through the V3 documentation I cannot see anyway to achieve what we are hoping to, I will submit a feature request.

I assume you plan to also use a CDN to deliver the content to the users right? In which case the delivery data per asset is really a factor of the number of bytes delivered per locator through the CDN's network.
Since that is likely the most common use case scenario, the CDN logs would likely be the better location to track the usage of data egressed per Asset URL.
The egress data from the Streaming Endpoint will only show you the content that was initially requested as a 'cache miss' at the CDN side.

For AMS, we do not provide the per asset or per streaming locator breakdown in data egress from the Streaming Endpoint today. Only the total aggregate egress in bytes, and soon in mbps egressed data via the Azure Monitor metrics - which you appear to have already discovered above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM