Keeping shard on a specific node

We’re developing an instance messaging platform and we’re using Cluster Sharding along with Persistence Actors to store and retrieve users’ data.

Due to the nature of persistence actors we cannot run another cluster alongside the production cluster with the same data. In order to run A/B testing or incrementally updating the cluster on the production environment we need to put some users’ actors on the A node. In order to do so, we need to keep these users’ actors on the specified node and keep away the other shards from the A node at the same time. This way we can make sure everything is right before delivering the product to the end-users.

How can we achieve this behavior? Is there another solution to this problem?
Thanks.

I think you should be able to do that with a custom ShardAllocationStrategy.

1 Like