[英]Azure function executions in consumption plan interfere with eachother
I have a serious issue with Azure Functions. 我对Azure Functions有严重的问题。 Let me sketch my scenario.
让我概述一下我的情况。
I have a workload for processing incoming data files in a blob container. 我有一个工作量,用于处理Blob容器中的传入数据文件。 Using a BlobTrigger my processing function picks up the file, processes it and removes it from the container.
使用BlobTrigger,我的处理功能会拾取文件,对其进行处理并将其从容器中删除。 Everything for one single file within 2 minutes of processing on the consumption plan.
在消费计划处理后2分钟内,一个文件的所有内容。
Everything ok there, so I'm happy. 一切正常,所以我很高兴。 Now I want to scale things up and offer +/- 10 of these batches in the blob container.
现在,我想按比例放大内容,并在Blob容器中提供+/- 10个批次。 The runtime starts executing them in parallel, so still works as expected.
运行时开始并行执行它们,因此仍可以按预期运行。 But then: the parallel executions of these functions slow down apparently, so the processing time of a single workload exceeds the max.
但是,然后:这些功能的并行执行速度明显降低,因此单个工作负载的处理时间超过了最大值。 execution time of 10 minutes!
执行时间为10分钟! That's (more than) a factor 5 slowing things down, dependent on the amount of jobs offered.
这是导致事情放慢速度的五分之一,这取决于提供的工作数量。
Am I missing the point here? 我在这里想念吗? This is what the functions were built for or is it just some toy or something?
这是为这些功能构建的,还是仅仅是玩具或其他东西? I resorted to annotating my function with [Singleton] for now, which completely discards any scaling benefits here?
我现在依靠[Singleton]来注释我的函数,在这里完全放弃了任何缩放方面的好处? How on earth could it be that 'serverless' execution units interfere with one another?
“无服务器”执行单元之间如何相互干扰?
I am very puzzled, any insights would be greatly appreciated. 我很困惑,任何见解将不胜感激。
You should look into Azure function scaling algorithm 您应该研究Azure函数缩放算法
First-time Azure function allocates small instance (1.5 GB) to process workload, It would take some time to understand scaling requirement then only Azure ScaleController would add/remove the instance. 首次使用Azure函数会分配一个小的实例(1.5 GB)来处理工作负载,这需要一些时间来了解扩展要求,然后只有Azure ScaleController会添加/删除该实例。 For single blob 1.5 GB instance takes 2 mins, with 10 blob same instance (1.5 GB) would share resources and it would take time.
对于单个blob,1.5 GB实例需要2分钟,而对于10 blob,同一个实例(1.5 GB)将共享资源,并且需要时间。
I don't see batch size setting for blob trigger in host.josn but I tried small batch size and solve a similar issue with ServiceBus. 我没有看到批量大小设置为BLOB触发器host.josn但我想小批量大小和解决类似的问题与ServiceBus。
You can send more workload on blob and with the help of application Insight, you can check Azure function scale out time. 您可以在blob上发送更多工作负载,并且借助应用程序Insight,可以检查Azure函数扩展时间。
I hope you already checked blob trigger issues. 希望您已经检查了 Blob触发器问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.