Charged for Publishing Azure Functions from VisualStudio? - azure

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

Related

Which plan to select for my Azure function : Consumption Plan or App Service Plan?

We have created a blob triggered azure function to process files placed in blob storage. Load on this blob will not be consistent.
For example, for some hours there will be hundreds or even thousands of file will be placed in that blob every minutes. On the other hand there will be some hours during which we will not find even a single file.
Some files will be processed in very few seconds and some can take more than 10-15 minutes.
So my question is: In this type of unpredictable scenario which plan will be better for us? App service plan or Consumption plan?
If you can optimize your code so that the maximum processing time is 10 minutes, so Consumption Plan is your best option from cost perspective considering your fluctuating workload
As #Peter Bons, mentioned in the comments, this is your best reference
Edit
According to the above document,
if your function app is on the Consumption plan, there can be up to a
10-minute delay in processing new blobs if a function app has gone
idle.
If you want to avoid that delay and still use consumption plan to benefit from its cost effectiveness, you can replace Blob Trigger with Event Grid Trigger but it is not fully supported by Azure Functions nowadays

Excessive Disk Writes on Azure Blobs with WebJobs

We recently transitioned from an Azure classic storage account to Azure GPv2 storage as it appeared to be cheaper from some calculations we did with the Azure calculator.
Here's a run down of the billing for a days worth of usage on the GPv2 storage account. Our current storage cost is now even higher than an S1 SQL Server instance at roughly .84 per day!
We started digging into the disk usage as this appears to be the biggest part of the billing. The entry for "Hot Block Blob Write Operations" at 6,200 writes for one day appeared to be the most impactful, so we reviewed the blob storage logs for writes under $logs. We saw a lot of heartbeat calls and singleton locks for our webjobs. We only have a small number of webjobs (like 6-8) and some use TimerTriggers (which would explain the locks every 30s). None of these calls are from blob writes from our app, only from behind the scenes webjob actions.
So my question is, has anyone experienced this kind of excessive usage? It seems that the webjobs are excessively chatty to the point that they will result in almost $30 per month in charges alone. We really love using webjobs, but I can only imagine how much more expensive it will be with even more webjobs. Is it possible to have the webjobs log to table storage or some cheaper mechanism? Are we seeing a double whammy from the webjob activity AND the $logs that are logging the webjob activity? We have all diagnostics disabled on the App Service and the blob storage, but it appears the $logs folder continues logging regardless.

Is there a cost for Azure Site Recovery if you finish one-time migration from on-prem to Azure within 31 days?

"Customers can replicate on-premises workloads to Azure with Azure Site Recovery for 31 days at no charge, effectively making migration to Azure free."
While the above statement from a Microsoft blog indicates ASR is free for a one-time migration done within 31 days, I wonder why the word "effectively" was used. I'm looking for a confirmation from those who have used it for a one-time migration that you just have to pay for Storage, storage transactions and outbound data transfer and there is no per instance cost.
"Effectively" here means that there is no cost as long as you do not continue using the service, incur data egress fee charges, etc. Basically, it's free to use as long as you remember to fail over your VMs, disable ASR and delete your Recovery Services Vault after you have finished your replication. (It should go without saying that the bandwidth you'll require obviously isn't "free").
Where people get in to trouble is forgetting that ASR is still running and doing something like copying a VHD after it's been migrated. Once you failover the VMs to Azure for the final time, you start incurring normal IaaS charges.
One final note - if you have really busy workloads or a huge amount of VMs, it's possible to incur some small charges for Storage Transactions with ASR, especially if you're using premium storage. I've never seen this be more than a few dollars a month.
If you think there's a chance that you might use the service after 31 days, you can use this tool to estimate charges: http://oms-calculator-webapp.azurewebsites.net/home

Are there free websites on Windows Azure for more than the trial period

I did a lot of searching but I guess Windows Azure's trial offers are constantly changing and there is a lot of different information over the internet. I am looking to develop a small website for learning purposes using Azure. My questions are:
1) Are there still 10 free websites after my 30-day trial ends?
If yes,
2) Can I use Table/Blob store after the trial period?
3) Can I use Azure SQL instance after the trial period?
From the horses mouth, so to speak:
Web Sites Pricing Details
You can run up to 10 websites for Free in a shared environment.
Azure Table Storage will cost, but it's not all that much. Storage Pricing Details gives you a run down, but I find their Pricing Calculator to be quite useful.
As an example:
100GB of blob storage
100GB of tables and queues
10 million transactions per month
is a grand total of $9.90 USD per month.

Azure Cloud Role included storage = extra costs?

I'm currently working out the cost-analysis for my upcoming Azure project. I am tempted to use a Azure Cloud Role, because it has a certain amount of storage included in the offer. However, I have the feeling that it is too good to be true.
Therefore, I was wondering. Do you have to pay transaction-costs/ storage costs on this "included" storage? I can't find any information about this on the Azure website, and I want to be as accurate as possible (even if the cost of transactions is almost nothing).
EDIT:
To clarify, I specifically want to know about the transaction costs on the storage. Do you have to pay a small cost per transaction on the storage (like with Blob/Table storage), or is this included in the offer as well?
EDIT 2:
I am talking about the storage included with the Cloud Services (web/worker) and not a separate Table/blob storage.
Can you clarify which offer you're referring to?
With Cloud Services (web/worker roles), each VM instance has some local storage associated with it, which is free of charge and, because it's a local disk, there are no transactions or related fees associated with this storage. As Rik pointed out in his answer, that data is not durable: it's on a single disk and will be gone forever if, say, the disk crashes.
If you're storing data in Blobs, Tables, or Queues (Windows Azure Storage), then you pay per GB ($0.095 cents per GB per month for geo-redundant storage, or $0.07 per GB per month for locally-redundant storage), and a penny per 100,000 transactions. And as long as your storage account is in the same data center as your Cloud Service, there's no data egress fees.
Now we come back to the question of which offer you're referring to. The free 90-day trial, for instance, comes with 70GB of Windows Azure Storage, and 50M transactions monthly included. MSDN subscriptions come with included storage and transactions as well. If you're just working with a pay-as-you-go subscription, you'll pay for storage plus transactions.
The storage is included, but not guaranteed to be persistent. Your role could be shut down and started on a different physical location, which has no impact on the availability of your role, but you'll lose your whatever you have in storage, I.E. the included storage is very much temporary.
As for transaction costs, you only pay for outgoing data, not incoming data or data within Azure (one role to another).
You pay per GB, and $0,01 per 100.000 transactions

Resources