流分析输出到Azure功能 [英] Stream analytics Output to Azure Function

查看:62
本文介绍了流分析输出到Azure功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们设置了一个环境,向IOT Hub发布消息并拥有Stream Analytics作业将输出发送到HTTPTrigger Azure功能(在消费计划中)。我们希望在更高的负载下(例如,当我向IotHub发布10000条消息时),Azure函数
将被并行调用(据我所知是默认行为)。但我们没有看到。我的看法是,负载永远不会高到足以让azure扩展并运行额外的服务器。此问题 来自实时指标的图像显示单个服务器

we've set up an environment where post messages to an IOT Hub and have a Stream Analytics job send output to an HTTPTrigger Azure Function (in a consumption plan). We expect that at higher loads (say when I post 10000 messages to IotHub), the Azure Function would be called in parallel (as I understand is the default behavior). But we don't see that. My take on it is that the load never gets high enough for azure to scale up and run an extra server. This  image from Live Metrics shows the single server

图像显示的请求数量很少。我已经看到它在另一个测试中每秒发出17个请求。 

The image shows a low number of requests. I've seen it go to 17 requests per second in another test. 

当我在代码中放入thread.sleep(60)时,我希望看到更多实例,但是然后我们只看到单个服务器。我们这么做了很多Backlogged输入事件,我认为这可能表示事件没有足够快地传递给Azure函数
以获得高负载? 

When I put a thread.sleep(60) in the code I would expect to see more instances but even then we just see the single server. We do so a lot of Backlogged Input Events, which I think possibly signals that events are not passed quick enough for the Azure functions to get a high load? 

对于此测试,我将Stream Analytics作业的SU设置为12SU。 Iot Hub设置为S2的1个单位。我没有迹象表明Iot Hub是瓶颈。

For this test i set the SU's for the Stream Analytics job to 12SU. The Iot Hub is set to 1 unit of S2. I have no indication that the Iot Hub is the bottleneck.

如果我继续对该函数运行一些额外的直接卷曲调用,它立即启动额外的服务器,如下所示。

If I then proceed to run some extra direct curl calls against the function, it instantly seems to spin up extra servers, as shown below.

所以这似乎是行为流分析?

So it would seem that is behavior of Stream Analytics?

问候

derk

推荐答案

嗨Derk,

Stream Analytics目前不支持在您的Azure功能上使用Http路由。

The use of Http routing on your Azure Functions is currently not supported by Stream Analytics.

有关详细信息,请参阅"从Azure流分析作业运行Azure功能"。

For more details, refer "Run Azure Functions from Azure Stream Analytics jobs".

希望这会有所帮助。


这篇关于流分析输出到Azure功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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