对于具有大量来宾可执行应用程序的群集,应在 Service Fabric Placement/Load balance 配置中设置哪些阈值?

Geo*_*ing 8 azure-service-fabric service-fabric-on-premises

对于具有大量来宾可执行应用程序的群集,应在 Service Fabric Placement/Load balance 配置中设置哪些阈值?

我在 Service Fabric 尝试将太多服务放置到单个节点上的速度过快时遇到了问题。

举一个集群大小的例子,有 2-4 个工作节点类型,每个节点类型有 3-6 个工作节点,每个节点类型可以运行 200 个来宾可执行应用程序,每个应用程序至少有 2 个副本。节点在运行时能够运行服务,只是 CPU 过高的启动时间。

问题似乎是集群配置中设置的放置和负载平衡规则的阈值或默认值。作为我尝试过的示例:我已打开InBuildThrottlingEnabled并设置InBuildThrottlingGlobalMaxValue100,我已将 Global Movement Throttle 设置设置为总应用程序计数的不同百分比。

在这一点上,我试图解决两种不同的情况。在这两种情况下,节点都会在一段时间内达到 100%,以便服务结构声明节点已关闭。

第一:从关闭的所有节点启动整个集群,而不会出现大量节点。

第二:单个节点在主机恢复联机后启动的服务过多而不堪重负

这是我在集群上的当前参数:

       "Name": "PlacementAndLoadBalance",
       “参数”: [
         {
           "Name": "UseMoveCostReports",
           “值”:“真”
         },
         {
           "Name": "PLBRefreshGap",
           “值”:“1”
         },
         {
           "Name": "MinPlacementInterval",
           “价值”:“30.0”
         },
         {
           "Name": "MinLoadBalancingInterval",
           “价值”:“30.0”
         },
         {
           "Name": "MinConstraintCheckInterval",
           “价值”:“30.0”
         },
         {
           "Name": "GlobalMovementThrottleThresholdForPlacement",
           “价值”:“25”
         },
         {
           "Name": "GlobalMovementThrottleThresholdForBalance",
           “价值”:“25”
         },
         {
           "Name": "GlobalMovementThrottleThreshold",
           “价值”:“25”
         },
         {
           "Name": "GlobalMovementThrottleCountingInterval",
           “价值”:“450”
         },
         {
           "Name": "InBuildThrottlingEnabled",
           “值”:“假”
         },
         {
           "Name": "InBuildThrottlingGlobalMaxValue",
           “价值”:“100”
         }
       ]
     },

基于下面回答中的讨论,想留下一个图形图像:如果一个节点出现故障,将服务改组到其余节点的行为将导致第二个节点出现故障,如此处所述。绿色节点关闭,然后紫色节点由于被混入的资源过多而关闭。

一张图证明了上述情况。 绿色下降,然后紫色在它后面

mas*_*der 3

从SF的角度来看,1和2是同一个问题。另请注意,SF 不会仅仅因为 CPU 消耗较高而驱逐节点。因此:“节点在一段时间内达到 100%,以致服务结构将节点声明为关闭。” 需要更多解释。这些机器可能会因其他原因而发生故障,或者我猜想可能负载过高,导致内核级故障检测器无法 ping 其他机器,但这并不常见。

对于配置更改:我将删除所有这些以使用默认值

 {
   "Name": "PLBRefreshGap",
   "Value": "1"
 },
 {
   "Name": "MinPlacementInterval",
   "Value": "30.0"
 },
 {
   "Name": "MinLoadBalancingInterval",
   "Value": "30.0"
 },
 {
   "Name": "MinConstraintCheckInterval",
   "Value": "30.0"
 },
Run Code Online (Sandbox Code Playgroud)

为了使内置节流阀发挥作用,需要将其设置为 true:

     {
       "Name": "InBuildThrottlingEnabled",
       "Value": "false"
     },
Run Code Online (Sandbox Code Playgroud)

此外,由于这些可能是约束违规和放置(而不是主动重新平衡),我们还需要明确指示 SF 限制这些操作。SF 中有此配置,尽管目前尚未记录或公开支持,但您可以在设置中看到它。默认情况下,仅限制平衡,但您应该能够打开所有阶段的限制,并通过如下所示设置适当的限制。

前两个设置也位于 PlacementAndLoadBalancing 中,与上面的设置一样。

 {
   "Name": "ThrottlePlacementPhase",
   "Value": "true"
 },
 {
   "Name": "ThrottleConstraintCheckPhase",
   "Value": "true"
 },
Run Code Online (Sandbox Code Playgroud)

用于设置限制的接下来的设置位于其自己的部分中,并且是不同节点类型名称到您想要对该节点类型进行限制的限制的映射。

{
"name": "MaximumInBuildReplicasPerNodeConstraintCheckThrottle",
"parameters": [
  {
      "name": "YourNodeTypeNameHere",
      "value": "100"
  },
  {
      "name": "YourOtherNodeTypeNameHere",
      "value": "100"
  }
]
},
{
"name": "MaximumInBuildReplicasPerNodePlacementThrottle",
"parameters": [
  {
      "name": "YourNodeTypeNameHere",
      "value": "100"
  },
  {
      "name": "YourOtherNodeTypeNameHere",
      "value": "100"
  }
]
},
{
"name": "MaximumInBuildReplicasPerNodeBalancingThrottle",
"parameters": [
  {
      "name": "YourNodeTypeNameHere",
      "value": "100"
  },
  {
      "name": "YourOtherNodeTypeNameHere",
      "value": "100"
  }
]
},
{
"name": "MaximumInBuildReplicasPerNode",
"parameters": [
  {
      "name": "YourNodeTypeNameHere",
      "value": "100"
  },
  {
      "name": "YourOtherNodeTypeNameHere",
      "value": "100"
  }
]
}
Run Code Online (Sandbox Code Playgroud)

我会进行这些更改,然后再试一次。其他信息(例如实际导致节点关闭的原因(通过事件和 SF 运行状况信息确认))将有助于确定问题的根源。验证在节点上启动 100 个应用程序实例是否确实有效以及这是否是适当的阈值可能也很好。