gpt4 book ai didi

azure-service-fabric - 每个节点有一个以上的无状态服务实例

转载 作者:行者123 更新时间:2023-12-04 12:45:26 25 4
gpt4 key购买 nike

我的无状态服务从服务总线队列接收任务并处理它。我现在正在尝试寻找一种尽可能多地使用 Service Fabric 节点资源的最佳方式。所以我看到 2 种方法:1)在服务内部创建多个线程 2)为每个节点创建多个服务实例。我认为第二种方式更安全和正确,但是当我为 1 节点集群指定 InstanceCount = 5 时,我收到了警告。

配置文件

<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="fabric:/EmailSenderApp" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="MainService_InstanceCount" Value="1" />
...
</Parameters>
</Application>

错误:
Unhealthy event: SourceId='System.FM', Property='State', HealthState='Warning', ConsiderWarningAsError=false.
Partition is below target replica or instance count.
fabric:/EmailSenderApp/EmailSenderMainService 5 1 09916a6b-1701-46ce-a281-0e223a68f980
Ready _Node_0 131708550454646056
(Showing 1 out of 1 instances. Total available instances: 1)

最佳答案

目前不可能在同一节点上有多个主分区。

SF 有放置限制来阻止这个,我认为这是一个错误,b 因为没有担心在无状态服务上丢失状态,因此我打开了一个 GitHub 问题到 Allow singleton stateless services to have multiple instances per node bypassing placement constraint

为了对这个问题进行排序,我将引导您使用解决类似问题的选项来回答这个问题:

Simulate 10,000 Azure IoT Hub Device connections from Azure Service Fabric cluster

关于azure-service-fabric - 每个节点有一个以上的无状态服务实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50349125/

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