Java API: Java implementations of custom shard allocation and rebalancing logic used by the ShardCoordinator should extend this abstract class and implement the two methods.
The default implementation of ShardCoordinator.LeastShardAllocationStrategy
allocates new shards to the ShardRegion
with least number of previously allocated shards.
The default implementation of ShardCoordinator.LeastShardAllocationStrategy
allocates new shards to the ShardRegion
with least number of previously allocated shards.
It picks shards for rebalancing handoff from the ShardRegion
with most number of previously allocated shards.
They will then be allocated to the ShardRegion
with least number of previously allocated shards,
i.e. new members in the cluster. There is a configurable threshold of how large the difference
must be to begin the rebalancing. The number of ongoing rebalancing processes can be limited.
Interface of the pluggable shard allocation and rebalancing logic used by the ShardCoordinator.
Interface of the pluggable shard allocation and rebalancing logic used by the ShardCoordinator.
Java implementations should extend AbstractShardAllocationStrategy.
ClusterSharding extension