Share via

Azure Function Pricing parameters

Matej Bednár 81 Reputation points
Feb 21, 2023, 7:34 PM

Hello,

Which parameter talks about Execution duration (seconds), Execution duration (seconds) and Resource consumption in Azure Function Metrics? I want to calculate based on formula my billings.pricing1

User's image

User's image

User's image

Any advice?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,654 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,856 Reputation points Microsoft Employee
    Feb 22, 2023, 12:04 AM

    Hello @Matej Bednár - You can use Azure Monitor - Metric Explorer for Execution Count & Memory usage. I'm not sure if you had a more specific use-case-based costing question regarding the Consumption SKU but here's a more comprehensive guidance: Consumption Plan Cost Billing FAQ

    UPDATE 2/22/23:
    The Pricing page that you were looking at in the screenshot above is maybe using general vocabulary in an effort to simplify pricing calculation through the specific example it takes with 512 MB Memory Usage in each execution, 3M Execution Count at a 1-second Execution Duration scenario. Using these values, let's determine the 2 groups of cost factors:

    • Cost for Execution Count = Execution Count (which is 3M) x price ($0.20 per million executions)
    • Cost for Total GB/s = Execution Time (1second) x Execution Count (3M) x Memory Usage (512MB) x price ($0.000016/GB-s)

    Based on the above, the final total is the sum of Execution Count cost + Total GB/s cost.


    At the Azure Monitor side, under the Metric dropdown, you'll find Functions Execution Count and Functions Execution Units:

    User's image

    The Function Execution Count metric directly refers to the 3M Execution Count in the pricing page's example. The Functions Execution Units metric refers to the Total GB/s value in the pricing page's example, however, please note that the Azure Monitor measures & present the value in Megabytes so you'll have to convert the value to GB (1GB = 1024MB).

    The wiki doc I shared above goes into the details deeper but I hope my answer here also helps. If you still have any doubts or questions, just let me know in the comments & I'd be happy to clarify further. Also, it's important to note here that the cost for utility services required for running your Functions Apps such as Storage and Monitoring, App Insights, etc are calculated separately through their own pricing model.

    Disclaimer: The pricing info shared in this post is subject to change and is taken as an example only.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.