Azure Functions Pricing for Multiple Apps - azure

I know that Azure Functions is free up to 1M executions and 400,000 GB-s every month.
Is this per function app per month?
If I have 3 function apps, does each get this allowance free each month?

As per the pricing page, this limit is combined for all Function Apps in an Azure Subscription.
Azure Functions consumption plan is billed based on per-second
resource consumption and executions. Consumption plan pricing includes
a monthly free grant of 1 million requests and 400,000 GB-s of
resource consumption per month per subscription in pay-as-you-go
pricing across all function apps in that subscription. Azure Functions
Premium plan provides enhanced performance and is billed on a per
second basis based on the number of vCPU-s and GB-s your Premium
Functions consume. Customers can also run Functions within their App
Service plan at regular App Service plan rates.

Related

Charged for Publishing Azure Functions from VisualStudio?

Do you get billed in Azure for each time you publish an Azure Functions from VS?
The short answer is Yes, you get charged for publishing an Azure Function from Visual Studio. But "each time?" well, not really.
So, let's get to understand how that works. Azure functions although they offer you 1,000,000 executions per month (considering the execution time and memory), your code has to live somewhere which is the Function Storage Account.
Storage Accounts pricing could be broken down into two main costs:
Storage:
You pay for storage per month (pay-as-you-go) unless you are on a Premium storage plan. The first 50 TB of data in a Hot access tier of blob data is ~$0.0184 to $0.0424 per GB depends on where your data is hosted and its redundancy.
Now in your case that cost will incure once per 50 TB per month
Transfer:
When you deploy your data via Visual Studio you're effectively making API calls to Write your data which is charged (also depends on your data host location and redundancy) per 10,000 operations that includes every time you or your function does PutBlob, PutBlock, PutBlockList, AppendBlock, SnapshotBlob, CopyBlob, and SetBlobTier on that Storage Account. The operations cost varies from $0.05 to $0.091 for every 10,000 operations.
Others:
Other costs may incure using features such as Blob Index, Blob Changes, and encryption.
Conclusion
Publishing your Function from Visual Studio contributes to the overall cost of the Functions's Storage Accout. However, the cost is very small (sub $1) even if you published your function thousands of times every month.
For more information about Azure Blob Storage pricing visit https://azure.microsoft.com/en-us/pricing/details/storage/blobs/#pricing

Effect of Horizontal scaling / scale out on Azure App Services Pricing

I am following best practices document and trying to implement Auto Scaling and would like to know about pricing perspective.
Robust-Apps-for-the-cloud
I would like to utilize custom auto scale to use multiple instances. I have configured the rules as shown here:
With this, I would like more information on how this will affect the pricing for my app service plan.
Note: My App Service Plan is S2.
App Service Plans are priced based on the size and number of instances you run, and they are billed on a per second basis. For your case on the S2 plan, a single instance will cost $0.20/hour.
I see on your autoscale configuration that the minimum and default number of instances you will be running on this plan is two instances. With this, if the autoscale triggers are not hit, your App Service Plan would cost $0.40/hour.
With the configuration you shared this could run up to $0.80/hour, if maximum four instances are run after the autoscale triggers are met.
As App Service Plans are billed on a per second basis, the cost will be prorated on a per second basis for the number of instances you run.
For example:
if you were running two instances for 40 minutes, three instances for 10 minutes, and four instances for the last 10 minutes of an hour. The total cost of the App Service Plan for that hour would be roughly: $0.50 for that hour.
If you were to scale up or down your App Service Plan tier you can see more information about how this could affect pricing using this tool here:
App Service Pricing

Azure FunctionApps vs Azure App Services for Compute intensive work

I have 2 questions first related to hosting, second related to sdk/library to use:
I need to write a kind of work allocation service scheduler to people, which will run say every 1 hour to run compute intensive logic in background and push the results in our database. The input may be number of days to create schedule for, number of people available, count of tasks to be done. So primarily its compute intensive.
Should i host it in App Service or in Azure Function (TimerTrigger)? This scheduler run as total background job and never called from UI or any backend API.
If i go App service way i have choice of either Hangfire or WebJob. How should i decide which is good for me.
Certainly quick execution with lesser cost is my criteia to move ahead.
One consideration for Azure function is how long the processing will take. Azure functions have a maximum time limit that depends on hosting plan. When you create a function app in Azure, you must choose a hosting plan for your app. There are three hosting plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan. An overview of hosting plans and their timeout durations is here: Azure Functions scale and hosting.
Unlimited duration is in Premium plan or Dedicated plan (Unlimited execution duration - 60 minutes guaranteed).
Maximum duration for Consumption plan is 10 minutes.

EP1 instance costs in function App Premium Elastic Plan w.r.t. Scale-up and Scale-out settings

Can anyone please elaborate me the minimum and miximum price of below settings(for reference) while creating the FunctionApp in Premium Elastic plan(EP1).
Q. How does Plan Scale out
Minimum Instances,
Maximum Burst and
App Scale out
Pre-Warmed Instances settings of FunctionApp affects costs?
For your question, I summarized the pricing rules below for your reference:
Azure Functions Premium plan provides the same features and scaling mechanism used on the Consumption plan, but the difference is we can set the Pre-Warmed instances.
Premium plan can avoid cold start by setting the Pre-Warmed instances, for example we can set 1 instance for Pre-Warmed(but smaller than minimum instances size which you set), then if the function app hasn't been requested for a long time, we just need to pay for the warm instance. The price is shown as below:
The EP1 plan is 3.5GB for each instance, so we can calculate the price.
While the function app is requested, then it will billed on a per second basis based on the number of vCPU-s and GB-s(based on the number of the instance which your function app uses on a per secnond).
Hope it would be helpful to your question~
I got the answer: here
"You are charged for each instance allocated in the minimum instance count regardless if functions are executing or not."

Do all app services on an app service plan share the same cost?

If I set an app service plan to an S2 and there are 2 (or more) app services on it is the cost 146/month or 146/month * 2?
You pay per instance in the App Service plan, the amount of apps you run there does not affect that cost.
You do have to pay some pennies for network traffic going out of your apps, that's per app.
With the exception of the Shared tier though where you pay per app.
So the main thing affecting the price is the Scale Up and Scale Out settings on the App Service plan (size of VMs + amount of VMs).
https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
Shared tier mentions for me:
~€8.003/month
per site
Basic and Standard tiers mention:
Pricing is based on the size and number of instances you run.
You can host up to 100 apps in a single app service plan, but the key thing to know here is that as with the free plan you are charged per app, not per app service plan.
When you pick the shared plan it is charged per instance in the app service plan.

Resources