Azure media services price calculation - azure

I want to use azure media services for video streaming but the azure docs are quite ambiguous regarding the pricing. Kindly let me know:
what are Streaming units
How do we calculate the cost with streaming units?
What is the data transfer cost and how is it associated with streaming units?
Keeping these into consideration if I have 10 videos uploaded, 100 watch minutes, how to calculate the cost?
If we are using CDN with streaming endpoint, will streaming endpoint and CDN both be billed?
Thanks in advance.

Several of these questions are answered on https://learn.microsoft.com/en-us/azure/media-services/latest/stream-streaming-endpoint-concept, but for completeness I'll answer directly here. If you use a Standard streaming endpoint Streaming Units are not needed. The endpoint autoscales up to 600 Mbps. A Premium streaming endpoint does use Streaming Units. These are dedicated to your account and allow you to scale beyond 600 Mbps.
The cost is listed on https://azure.microsoft.com/en-us/pricing/details/media-services/ (click on "Streaming" 1/3 of the way down the page). The pricing is simply related to the amount of time the streaming endpoint is in the running state. Whether a client is streaming or not doesn't matter.
The primary cost related to streaming is the data egress or CDN egress. https://azure.microsoft.com/en-us/pricing/details/bandwidth/ and https://azure.microsoft.com/en-us/pricing/details/cdn/ respectively. The cost is based on the amount of data transferred, not the length of the video. This is because videos can be encoded at different bitrates.
Using the pricing calculator at https://azure.microsoft.com/en-us/pricing/calculator/?service=media-services can help.

Related

Azure Parse incoming hex data from IoT Hub

I have a device which sends data in the form of Hexadecimal value based on an algorithm to IoT Hub. I want to parse that data into a json string to store it in Cosmos DB. Is there any way to achieve this?
I would like to add to Roman's comment on your question, he's right to offer this link to Stream Analytics. It will get the job done. Depending on how many devices you have and how often you are receiving telemetry, you might want to consider using Azure Functions instead. See this sample on how to integrate Azure Functions between IoT Hub and CosmosDB.
The reason I offer this extra solution is that a Stream Analytics Job will cost you a fixed price per hour per streaming unit, while a Function is paid by consumption. Because the conversion from hexadecimal is a fairly small Function, you might even use it for free whereas a Stream Analytics Job in West Europe will cost at least 74 Euros.

Azure Stream Analytics. Pricing

I am looking at pricing information for Azure Stream Analytics using the Azure Pricing Calculator: https://azure.microsoft.com/en-us/pricing/calculator/#stream-analytics378d63b3-303d-4548-afd0-bac5d4249611
I says that it cost 80 USD for 1 month (730 hours).
Is this the idle price?
If i don't send any data to Steam Analytics I will be charged 80 USD a month for having the service deployed. Correct?
Then op top of that I pay for my actual usage in form of streaming units, where a streaming unit, according to the FAQ, is a blend of compute, memory, and throughput.
As a cloud service, Stream Analytics is optimized for cost. There are no upfront costs involved - you only pay for the streaming units you consume, and the amount of data processed. There is no commitment or cluster provisioning required, and you can scale the job up or down based on your business needs.
While creating stream Analytics Job, if you created a Stream Analytics job with streaming units = 1, it will be billed $0.11/hour.
If you created a Stream Analytics job with streaming units with N, it will be billed $0.11 * N/hour.
Hope this helps. If you have any further query do let us know.
NO. You will pay only for what you use. For example if you configure 1 streaming unit and used 10 hours per month (10*0.11). If you configure 2 streaming unit and used 20 hours per month (20*0.11*2)
1.If i don't send any data to Steam Analytics I will be charged 80 USD a
month for having the service deployed.
Quick answer is yes.Based on this document:
As a cloud service, Stream Analytics is optimized for cost. There are
no upfront costs involved - you only pay for the streaming units you
consume, and the amount of data processed. There is no commitment or
cluster provisioning required, and you can scale the job up or down
based on your business needs.
SU is basis of ASA job. Choosing the number of required SUs for a particular job depends on the partition configuration for the inputs and the query that's defined within the job.More details,please refer to this link.
2.Then op top of that I pay for my actual usage in form of streaming
units, where a streaming unit, according to the FAQ, is a blend of
compute, memory, and throughput.
If your data is not updated in real time, or very small,maybe ASA is not your Best choice. You could follow some suggestions in this thread:Azure Stream Analytics job expensive for small data?

Azure Stream Analytics job expensive for small data?

In order to write sensor data from an IoT device to a SQL database in the cloud I use an Azure Streaming Analytics job. The SA job has an IoT Hub input and a SQL database output. The query is trivial; it just sends all data through).
According to the MS price calculator, the cheapest way of accomplishing this (in western Europe) is around 75 euros per month (see screenshot).
Actually, only 1 message per minute is send through the hub and the price is fixed per month (regardless of the amount of messages). I am surprised by the price for such a trivial task on small data. Would there be a cheaper alternative for such low capacity needs? Perhaps an Azure function?
If you are not processing the data real-time then SA is not needed, you could just use an Event Hub to ingest your sensor data and forward it on. There are several options to move data from the Event Hub to SQL. As you mentioned in your question, you could use an Azure Function or if you want a no-code solution, you could us a Logic App.
https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-azure-event-hubs
https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure
In addition to Ken's answer, the "cold path" can be your solution, when the telemetry data are stored in the blob storage by Azure IoT Hub every 720 seconds (such as a maximum batch frequency).
Using the Azure Event Grid on the blob storage, it will trigger an EventGridTrigger subscriber when we can handle starting a streaming process for this batch (or for a group of batches within an one hour). After this batch process is done, the ASA job can be stopped.
Note, that the ASA job is billed based on the active processing time (that's the time between the Start/Stop) which your cost using an ASA job can be significantly dropped down.

What's the Azure bandwidth pricing?

I'm a bit confused by Azure price calculator. In particular it doesn't explain the bandwidth pricing.
I'm considering Azure for a restful api that is going to use blobs for most data storage together with a sql server database for a subset that is easier to manage with a relational approach.
In this application a lot of data will enter the system through the ReST api, but a small fraction will be exposed to the clients (mainly as summary reports). Still the total bandwidth required should be in the order of 50 GiB/mo.
In the Azure's pricing page related to data transfer I see the pricing is only related to outgoing data, but I cannot figure how this relates to a ReST api that will be hosted in Azure App Service.
I mean, it could just mean that I'm going to pay for the bandwidth consumed by HTTPS responses (and not by HTTPS requests), but it seems a bit hard to estimate what this pricing is going to be.
Within a given region, there are no transfer costs at all. You mentioned using App Service, blobs, and SQL Database. As long as those services are within a single region, there are zero bandwidth costs as data flows between them and any other service within that region.
Bandwidth is billed specifically for outbound transfer. So, essentially you're metered for all data leaving a given region.
If you look at the page Data Transfers Pricing Details
Data Transfers refer to data moving in and out of Azure data centres other than those explicitly covered by the Content Delivery Network or ExpressRoute pricing.
Inbound data transfers
(i.e. data going into Azure data centres): Free
Outbound data transfer prices are set at a sliding scale depending on location and bandwidth used.
inbound traffic is free so the data coming in can be removed from the equation. Outbound is not free, and you saw the pricing page.
Data transfer is everything that is going out from every operation you execute.
And it is hard to estimate the traffic pricing - i would recommend to register the Azure trial and test it for a month and see how it is going. Because your data is not only what is returned, there is a lot of payloads coming with that.
But if you estimate 10 GB/month of outbound traffic, then it will start from $0.087 per GB starting from fifth GB (because first 5 are free). There are different regions described at the pricing page as well, so you should apply the pricing according to the region where your website is.

turning off azure media services end-point when idle

is it possible to turn off an azure media services end-point when idle, and turn it on again by demand (either by ways of configuration or programmatically?)
the purpose of this being saving costs on the end-point when not used.
There are several billing meters which apply for azure media services See https://azure.microsoft.com/en-us/pricing/details/media-services/ for all details.
Main price components:
Storage - you are paying based on how many space consumed by your assets. You can delete assets which are you no longer planning to use to avoid extra charges.
Encoding without reserved units - usage charges based on size of processed data. Your are not paying if system is in idle state.
Encoding with reserved Units - Same as #2 plus you are paying for allocation of resources.Reserved units help you to encode multiple jobs in a same time. Use portal to increase/decrease number of reserved units or REST/API, Client SDK to configure this parameter - https://msdn.microsoft.com/en-US/library/azure/dn859236.aspx#update_EncodingReservedUnitType
Live channels - For all live channel types, billing is based on the amount of time the channel is in running state and not based on the incoming and processed data. You can stop or delete channel to avoid incurring charges. See https://msdn.microsoft.com/en-us/library/azure/dn783458.aspx#stop_channels
Streaming units - Provides dedicated bandwidth capacity for both on-demand and live streaming. Pricing per unit. You can start/stop/scale streaming endpoint through portal or rest api - see https://msdn.microsoft.com/en-us/library/azure/dn783468.aspx
Content Protection - charges based on licences/keys issued through a service.

Resources