“唤醒";服务总线队列触发的Azure功能的时间 [英] "Wake up" time of Azure Function triggered by Service Bus Queue

查看:76
本文介绍了“唤醒";服务总线队列触发的Azure功能的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由Azure Service Bus队列触发的Azure Function-Azure Function App托管在使用计划中.

I have an Azure Function triggered by Azure Service Bus queue - Azure Function App is hosted in consumption plan.

当队列中出现新消息时,唤醒Azure功能最多需要多长时间? (假设在过去20分钟内没有任何消息).

How long does it take at most to wake up an Azure Function when new message in queue appears? (assuming there were no message during past 20 minutes).

是否在任何地方指定了?我在文档中发现:

Is it specified anywhere? I've found in the Documentation that:

对于非HTTP触发器,新实例最多每30秒分配一次.

For non-HTTP triggers, new instances will only be allocated at most once every 30 seconds.

这是否意味着我将无法比30秒内更快地处理队列中的第一条消息?

Does it mean that I won't be able to process the first message in the queue faster than within 30 seconds?

是否将计时器触发的Azure功能添加到同一功能应用程序(以及触发的服务总线)有助于保持Azure Function实例正常运行?

Will adding Timer Triggered Azure Function to the same Function App (along with Service Bus triggered) help to keep the Azure Function instance up and running ?

推荐答案

首先,当使用消耗计划并空闲约20分钟时,功能应用程序将进入空闲状态.然后,如果您使用该功能,则会遇到冷启动,该操作需要一些时间该醒了.

First of all, when using consumption plan and idle for about 20 minutes, the function app goes into idle. And then if you use the function, you will experience cold start, which needs to take some time to wake up.

您的问题:

这是否意味着我将无法处理邮件中的第一条消息 排队比30秒还快?

Does it mean that I won't be able to process the first message in the queue faster than within 30 seconds?

这取决于以下内容(链接为此处):

It depends on following(link is here):

1 .您正在使用哪种语言(例如,使用c#的函数比Java更快),请从上面的链接中选择以下语言:

1.which language you're using(eg. function using c# is more faster than java), the following is picked up from the link above:

典型的冷启动延迟时间为2到15秒. C#函数通常在3秒内完成启动,而JavaScript和Java的尾巴更长.

2.函数中依赖项的数量:

2.The number of dependencies in your function:

添加依赖项并因此增加已部署的程序包大小将进一步增加冷启动持续时间.

将计时器触发的Azure功能添加到同一功能应用程序 (以及触发的服务总线)有助于保持Azure功能 实例启动并运行?

will adding Timer Triggered Azure Function to the same Function App (along with Service Bus triggered) help to keep the Azure Function instance up and running ?

是的,在同一功能应用程序中添加计时器触发的天蓝色"功能将使其他应用程序保持预热(启动并运行).

Yes, add a Timer Triggered azure function to the same function app would keep the others warm up(up and running).

这篇关于“唤醒";服务总线队列触发的Azure功能的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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