gpt4 book ai didi

concurrency - Azure Functions 并发和缩放行为

转载 作者:行者123 更新时间:2023-12-05 06:58:39 24 4
gpt4 key购买 nike

SO 上有一堆 Azure Functions 并发问题,但没有一个专门解决这个问题。

我正在全神贯注于 HTTP 触发的函数应用程序的缩放场景(如果重要的话,运行时是 Node.js)。我来自 AWS Lambda 世界,每个并发调用 results在一个新的 Lambda 实例中:

If the function is invoked again while a request is still being processed, another instance is allocated, which increases the function's concurrency.

让我对 Azure Function 应用程序感到困惑的是这篇文章来自他们的 documentation :

A single function app only scales out to a maximum of 200 instances. A single instance may process more than one message or request at a time though, so there isn't a set limit on number of concurrent executions.

在什么情况下单个 FA 实例会同时处理多个请求?

最佳答案

这一行大概指的是下面information :

The host.json file in the function app allows for configuration ofhost runtime and trigger behaviors. In addition to batching behaviors,you can manage concurrency for a number of triggers. Often adjustingthe values in these options can help each instance scale appropriatelyfor the demands of the invoked functions.

Settings in the host.json file apply across all functions within theapp, within a single instance of the function. For example, if you hada function app with two HTTP functions and maxConcurrentRequestsrequests set to 25, a request to either HTTP trigger would counttowards the shared 25 concurrent requests. When that function app isscaled to 10 instances, the two functions effectively allow 250concurrent requests (10 instances * 25 concurrent requests perinstance).

Other host configuration options are found in the host.json configuration article.

关于concurrency - Azure Functions 并发和缩放行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64564956/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com