简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM