对于每个事件,azure是否在消费计划中创建一个新的Azure函数实例
For every event, does azure create a new instance of Azure function in consumption plan
我正在阅读有关 Azure 函数的信息,发现 azure 仅对 azure 函数的时间收费 运行。假设我创建了一个 Azure 函数并将其与服务总线绑定。 Azure 会为每个事件创建一个新的 Azure 函数实例,还是会利用已经创建的 azure 函数。我担心性能。如果它为每个事件加载 azure 函数,它会对性能产生巨大影响。
谢谢
在消费计划中,Azure Functions 将利用已加载的现有函数 'instance',前提是它可用。
如果应用程序上的所有功能在给定的时间内都没有收到处理请求,则该实例将 'torn down',您将不得不 'warm up' 处理下一个请求公认。我没能找到指示空闲时间的 'official' 文档,但是有多个 GitHub 问题确实提到了这个空闲时间是 5 分钟的 inactivity.
For Functions that are created under the Consumption Plan, the Function App instance will stay alive for 5 minutes
Function goes idle when running in Consumption Plan with Service Bus Queue trigger
如果您在至少 1 个功能中定期出现 activity,那么您的应用将保持 'warmed up' 状态并立即处理您的请求。
如果这不是理想的行为,请考虑 'workaround' 或可能查看启用了 'Always On' 设置的应用服务计划。如果您对此感兴趣,请查看类似的答案。
我正在阅读有关 Azure 函数的信息,发现 azure 仅对 azure 函数的时间收费 运行。假设我创建了一个 Azure 函数并将其与服务总线绑定。 Azure 会为每个事件创建一个新的 Azure 函数实例,还是会利用已经创建的 azure 函数。我担心性能。如果它为每个事件加载 azure 函数,它会对性能产生巨大影响。
谢谢
在消费计划中,Azure Functions 将利用已加载的现有函数 'instance',前提是它可用。
如果应用程序上的所有功能在给定的时间内都没有收到处理请求,则该实例将 'torn down',您将不得不 'warm up' 处理下一个请求公认。我没能找到指示空闲时间的 'official' 文档,但是有多个 GitHub 问题确实提到了这个空闲时间是 5 分钟的 inactivity.
For Functions that are created under the Consumption Plan, the Function App instance will stay alive for 5 minutes
Function goes idle when running in Consumption Plan with Service Bus Queue trigger
如果您在至少 1 个功能中定期出现 activity,那么您的应用将保持 'warmed up' 状态并立即处理您的请求。
如果这不是理想的行为,请考虑 'workaround' 或可能查看启用了 'Always On' 设置的应用服务计划。如果您对此感兴趣,请查看类似的答案