3
votes

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?

1
The doc says: "The default timeout for functions on a Consumption plan is 5 minutes. The value can be increased for the Function App up to a maximum of 10 minutes by changing the property functionTimeout in the host.json project file."CSharpRocks
Thank you PeterBons and CSharpRocks for support. Suppose some how I optimize the code which grantees that all files will be processed within 10 minutes. In this case which plan will be better for me?Yash

1 Answers

3
votes

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