为我的Azure功能选择哪个计划:消费计划或应用程序服务计划? [英] Which plan to select for my Azure function : Consumption Plan or App Service Plan?

查看:193
本文介绍了为我的Azure功能选择哪个计划:消费计划或应用程序服务计划?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们创建了一个Blob触发的Azure函数,以处理放置在Blob存储中的文件。此Blob上的负载将不一致。
例如,在某些小时内,每分钟将有数百甚至数千个文件放置在该blob中。另一方面,在几个小时内,我们甚至找不到一个文件。
有些文件将在几秒钟内处理完毕,而某些文件可能需要10-15分钟以上的时间。

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?

推荐答案

如果可以优化代码,使最长处理时间为10分钟,那么消费从成本角度考虑到您不断变化的工作量,计划是您的最佳选择

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

正如@Peter Bons所提到的那样,此是您的最佳参考书

As @Peter Bons, mentioned in the comments, this is your best reference

编辑

根据上述文档,


功能应用处于消费计划中,如果功能应用闲置了
,则在处理新的Blob时最多可能会有
10分钟的延迟。

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.

如果要避免这种延迟,并且仍然使用消耗计划以从其成本效益中受益,则可以用事件网格触发器,但如今Azure功能尚未完全支持

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

这篇关于为我的Azure功能选择哪个计划:消费计划或应用程序服务计划?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆