高级层的 Azure Function Apps 可扩展性指标和术语

问题描述 投票:0回答:1

我试图更好地理解高级功能应用程序的可扩展性行为,但我对术语感到困惑。具体来说,我试图了解我的应用程序有多少“服务器”和多少“容器”正在运行,但我无法确定这些指标到底是什么:

  • 应用程序角色实例
  • 主机实例Id
  • 进程ID

起初我认为“主机”会接近VM,而“实例”会接近容器,但根据我所看到的,实际上可能是相反的情况。在始终可用的功能应用程序上,ProcessId 的

dcount
在 1 和 2 之间变化,最小为 3,所以我无法真正理解这个 process-id 是什么。除了一些“主机”峰值之外,AppRoleInstance 和 HostInstanceId 在大多数情况下都是匹配的。作为参考,我使用的查询与此类似:

AppTraces
| where AppRoleName = <function-app-name>
| summarize
    dcount(tostring(AppRoleInstance)),
    dcount(tostring(Properties.HostInstanceId)),
    dcount(tostring(Properties.ProcessId))
  by bin(TimeGenerated, 1h)
| render timechart
azure azure-functions azure-app-service-plans
1个回答
0
投票

在始终可用的功能应用程序上,ProcessId 的

dcount
在 1 和 2 之间变化,最小为 3,所以我无法真正理解这个进程 ID 是什么。

一旦主机启动某个功能,进程 ID 就会在 Kudu 站点中分配。

  • 您可以通过导航到高级工具来验证相同的内容。

enter image description here

  • w3wp.exe 当函数被触发时,处理程序将被激活,并且只要该作业主机处于活动状态,它就会保持活动状态。

enter image description here

enter image description here

  • 如果函数应用程序空闲 20 分钟,则作业主机停止,您将不再看到 w3wp.exe

enter image description here

enter image description here

  • 当您触发该功能或检测到任何活动时,将使用新的进程 ID 初始化新主机。

enter image description here

enter image description here

enter image description here

  • AppRoleInstance 表示一次运行的 Function App 实例的数量,每个实例充当一个容器,运行在服务器中。
  • HostInstanceId 表示为您的函数应用托管的服务器数量。
  • Process Id表示容器中运行的进程数。在函数应用程序中,每个容器可以有一个进程,但如果您使用 Always On 托管计划,那么您可以看到多个进程正在运行。
© www.soinside.com 2019 - 2024. All rights reserved.