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

三世轮回 提交于 2020-05-27 12:07:17

问题


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:


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



来源:https://stackoverflow.com/questions/54092758/which-plan-to-select-for-my-azure-function-consumption-plan-or-app-service-pla

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!