Track the usage and bill in Azure api-management - azure

Each customer will have a web api application. Is there a way to bill customer as per the usage by deploying it to api-management?
I have gone through the following article but we are not expecting each customer to have such data requirement to choose Standard/Premium.
https://azure.microsoft.com/en-in/pricing/details/api-management/
Also, I am confused what the unit means and how pay as you go will work if there are limitations such as ~1 TB/month data transfer. Does ~1 TB denote the maximum usage in this package?

1) if by "bill customer as per usage" you are expecting to capture the number of total backend api invocations through APIM and bill customer based on counts from APIM - yes it is possible. Also you can on-board multiple API's (backend) on a single instance of APIM or onboard the same backend api as 2 api's on APIM and share two different URL's and track usage separately.
2) yes per unit in standard 1 TB is the max. Pay as you go is by the units consumed (and not the number of api calls going through APIM) and a unit has upper ceiling in-terms of no. of calls and data transfer. so yes in short if you choose standard with 1 unit you need to pay 699/month if there are 100 api calls or 1 million (upto max 7 mil per day) going through APIM but you have the flexibility to choose number of units based on volume you need and pay only for that.

Related

What business logic is the Azure Cost Export applying?

I want to get the most up to date actual costs in Azure. There seem to be 4 ways of doing this with different results:
Export Costs to Storage Account
Cost Management API
Billing API
Consumption API
Number 1 works well but I need an API, not a file dump.
Number 2 seems to be made for powering the Cost Management UI with high-speed dimension querying
Number 3 seeems to be in Preview but legacy (!)
Which brings me to number 4. I compared this query with the output from the CSV Cost Export file and noticed these differences in yellow:
https://management.azure.com//subscriptions/734d4013-00e7-4561-8e04-2121d8d5a702/providers/Microsoft.Consumption/usageDetails?api-version=2019-10-01&$filter=properties/usageStart eq '2020-12-01' and properties/usageEnd eq '2020-12-01'&$expand=meterDetails,additionalInfo
My question are:
Is the Export file the SAME information as the API or is it applying additional business logic that I need to cater for?
Is this API call above the most up to date costs?
Do I need to do anything with a rate card or take into account azure deals or discounts or is everything self-contained in this?
There was a bigger "Usage" return type with more columns (Called Modern, not Legacy) but I needed a Billing ID to access it, which I could not find (I am using a VS MSDN Subscription) - how can I use the modern return types?
All legacy billing accounts will be moved to new Modern billing account (MCA) upto that migration gets completed this changes will be there

split costs in Azure API Management

I have two API Managements created in Azure. One for DEV and the other for PROD. Both are "Basic" Tier
I have many APIs in each of them. I want to divide cost for each "Cost Center" in my organization.
The best way to do this is by number of requests? I think yes, but I will listen recommendations
But what is the best way for this? For example, one API consumes the 80% of the total requests... So this API will pay the 80% of API Management cost. I have to divide cost manually?
Thanks
It depends on definition of a Cost Center. In order to get the number of request per API, Product or Subscription, use the report API.
I would suggest to split costs into infrastructure, development and operation categories.
Infrastructure could be based on number of requests
Development are one time costs based on complexity of the APIs. They have clear business owner=Costs center.
Operation are recurring costs you have with support and bugfixing of the APIs and the API Management. They could be derived from the development costs (for example 20%).

Azure Service Plan - Scale out charges

Do i need to pay twice the monthly charges (56$/month) if I "scale out" my basic service plan to 2 instances ? Or price is inclusive up to 3 instances ?
You'll be charged per instance when you scale out. So two instances will be $112/month, and three will be $168/month.
As Rob Reagan mentioned that it will be charged per instance. We can get the price via azure pricing calculator. More details please refer to the screenshot.
If you are not going to use the 3 capabilities full time, program the horizontal scale of your service to use at least 1 to 3 instances when you reach a certain parameter you can choose. This way you will pay for the additional machines only for as long as they are needed.

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.

Is there any way to see estimated Azure costs before actually using the services?

Right now I have a small web app hosted on Azure services. Its 5 asp.net pages, 1 sql DB, and 2 scheduled jobs. Just through testing, I used 2 dollars of the 220 dollars credit they give you for signing up.
The problem I'm having is that there is no clear pricing guide for the pay-as-you-go service they offer. My live testing was very very lightweight (10 page hits, maybe 50db transactions, and 10 job runs) and its already cost 2 dollars. The breakdown available makes it clear where that money has gone (the scheduled jobs), but doesnt make it clear how much additional usage may cost me going forward.
Is there any area in azure, or any service anywhere, that can estimate the total cost under various loads? I am very hesitant to open this service up to the public until I know exactly what the costs will be, as right now the site brings in 0 revenue, so it wouldnt be worth paying a ton of money just for hosting until I get a revenue model set up.
Sure - use the Azure pricing calculator - http://azure.microsoft.com/en-us/pricing/calculator/

Resources