Azure Functions 并发性:maxConcurrentRequests - 是否真正并行地同时执行所有同时发生的请求

Azure Functions concurrency: maxConcurrentRequests - is it Truly parallel to give a simultaneous execution of all requests happening at the same time

在此线程中解释说

  1. 如果 Azure 决定你的应用程序需要扩展并创建一个新的 主机,并假设有两个主机,那么这些参数的值(maxConcurrentRequestsFUNCTIONS_WORKER_PROCESS_COUNT)是 按主机而不是跨主机应用。
  2. 如果你的应用有多个功能 然后 maxConcurrentRequests 应用 to-all/across 内的函数 这个主机,不是每个功能。

问题是,

因为消耗计划中 Functions 主机的每个实例限制为 1.5 GB 内存和一个 CPU(Reference), how can it run parallel loads with one CPU? On a different thought this 确实说每个实例的 ACU 对于消耗计划是 100

有关完整性,请参阅 , and this. And OP already read it, but this also

Is it possible to have more than one function app on a single host

Documentation 非常混乱。据我所知:

  • 关于消费计划,没有。
  • 在 premium/app-service 计划中,there is a 提示可能意味着关系是许多应用程序的一个宿主,但 IMO 值得商榷。

(Is this what is controlled by FUNCTIONS_WORKER_PROCESS_COUNT?)

没有.

需要理解的条款:

  • 功能应用:一个功能应用。顶级 Azure 资源。函数的逻辑集合。
  • 函数:一个函数 in/out-trigger/binding(s)。一个功能应用程序包含一个或多个功能。
  • Function Host:Virtual/physical Function App 作为 Linux/Windows 进程运行的主机。
  • 工作进程:功能主机上的一个进程(一个 pid)运行。
    • 一个工作进程承载一个功能应用程序的所有功能。
    • 一台主机上将有 FUNCTIONS_WORKER_PROCESS_COUNT(默认 1)个工作进程 运行,共享所有资源(RAM、CPU、..)

maxConcurrentRequests = 100 does this really means that all 100 requests will be processed in parallel (simultaneously) by a single host (Consumption plan , 1 CPU,1.5GB Host ) .

, execution would be in parallel within limits 个所选计划。

This thread here suspects everything is executed in series?!

我确定有一个解释。 unambiguous documentation 表示请求确实在限制范围内并行执行。