[英]Azure Functions Elastic Premium Plan and Queue Triggers
We have a solution where we use an Azure Storage Queue to process messages that take approx 6 minutes.我们有一个解决方案,我们使用 Azure 存储队列来处理大约需要 6 分钟的消息。
I've read that the maximum batchSize
of Queue messages concurrently processed are 32
per VM.我读到并发处理的队列消息的最大
batchSize
是每个 VM 32
。
If the function app scales out to multiple VMs, each VM could run one instance of each queue-triggered function.
如果 function 应用程序扩展到多个 VM,则每个 VM 可以运行每个队列触发的 function 的一个实例。
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue?tabs=in-process%2Cextensionv5%2Cextensionv3&pivots=programming-language-csharp#host-json https://learn.microsoft.com/zh-cn/azure/azure-functions/functions-bindings-storage-queue?tabs=in-process%2Cextensionv5%2Cextensionv3&pivots=programming-language-csharp#host-json
How does that translate to Azure Functions Premium plan
?这如何转化为
Azure Functions Premium plan
? Lets say we want to be able to process 64
messages at once using Azure Functions Premium plan with Always ready instances
.假设我们希望能够使用 Azure Functions Premium plan with
Always ready instances
一次处理64
条消息。 If we have 2
ready instances, can they process 2 * 32 concurrent messages?如果我们有
2
就绪实例,它们可以处理 2 * 32 个并发消息吗? Or do they underwater really need to be on seperate VM's and 2 instances will not do anything different?或者他们在水下真的需要在单独的 VM 上并且 2 个实例不会做任何不同的事情吗?
In the Premium plan, you can have your app always ready on a specified number of instances.
在高级计划中,您可以让您的应用程序在指定数量的实例上始终就绪。 The maximum number of always ready instances is 20. When events begin to trigger the app, they are first routed to the always ready instances.
always ready 实例的最大数量是 20。当事件开始触发应用程序时,它们首先被路由到 always ready 实例。
https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan?tabs=portal#always-ready-instances https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan?tabs=portal#always-ready-instances
Yes.是的。 In Azure Functions premium plan, if you have pre-warmed instance, then that is given a dedicated VM instance.
在 Azure Functions 高级计划中,如果您有预热实例,则会获得一个专用VM 实例。 So, if you had 2 VM instances running your function app, then they can process 2*(
batchSize
+ newBatchThreshold
) concurrent Queue messages.因此,如果您有 2 个 VM 实例运行 function 应用程序,那么它们可以处理 2*(
batchSize
+ newBatchThreshold
) 个并发队列消息。 The Azure platform scales the function app onto new VM as the existing instances gets more busy.随着现有实例变得更加繁忙,Azure 平台将 function 应用扩展到新的 VM 上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.