更改可靠参与者服务的分区数
Changing number of partitions for a reliable actor service
当我创建一个新的 Service Fabric actor 时,底层(自动生成的)actor 服务被配置为使用 10 个分区。
我想知道我需要在多大程度上关心这个值?
特别是,我想知道 Actor Runtime 是否支持更改 运行 集群上 actor 服务的分区数。
Partition Service Fabric reliable services 主题说:
In rare cases, you may end up needing more partitions than you have initially chosen. As you cannot change the partition count after the fact, you would need to apply some advanced partition approaches, such as creating a new service instance of the same service type. You would also need to implement some client-side logic that routes the requests to the correct service instance, based on client-side knowledge that your client code must maintain.
但是,由于 Actor 的性质以及它们由 Actor Runtime 管理,我很想相信确实可以做到这一点。 -- Actor 运行时将能够处理重新分区 actor 实例所需的所有繁重工作。
这可能吗?
无法更改 运行 服务中的分区数。 Actor 和 Reliable Services 都是如此。通常,您会希望预先选择大量分区(多于节点数),然后扩展集群中的节点数,而不是试图动态地重新分区数据。查看 discussion here 中 Abhishek 和 Matthew 的评论,了解有关如何估计您可能需要多少分区的一些想法。
当我创建一个新的 Service Fabric actor 时,底层(自动生成的)actor 服务被配置为使用 10 个分区。
我想知道我需要在多大程度上关心这个值?
特别是,我想知道 Actor Runtime 是否支持更改 运行 集群上 actor 服务的分区数。
Partition Service Fabric reliable services 主题说:
In rare cases, you may end up needing more partitions than you have initially chosen. As you cannot change the partition count after the fact, you would need to apply some advanced partition approaches, such as creating a new service instance of the same service type. You would also need to implement some client-side logic that routes the requests to the correct service instance, based on client-side knowledge that your client code must maintain.
但是,由于 Actor 的性质以及它们由 Actor Runtime 管理,我很想相信确实可以做到这一点。 -- Actor 运行时将能够处理重新分区 actor 实例所需的所有繁重工作。
这可能吗?
无法更改 运行 服务中的分区数。 Actor 和 Reliable Services 都是如此。通常,您会希望预先选择大量分区(多于节点数),然后扩展集群中的节点数,而不是试图动态地重新分区数据。查看 discussion here 中 Abhishek 和 Matthew 的评论,了解有关如何估计您可能需要多少分区的一些想法。