As Ivan mentioned, the default algorithm is in EvenShardsCountAllocator. As
you can see from the name, it tries to allocate shards evenly across all
nodes in the cluster. In other words it tries to allocate the same number
of shards on each node.
You can control shards allocation explicitly by using Cluster Reroute APIhttp://www.elasticsearch.org/guide/reference/api/admin-cluster-reroute.htmland declaratively by using index
On Monday, October 22, 2012 11:27:27 PM UTC-4, Ivan Brusic wrote:
I believe the main algorithm is defined in EvenShardsCountAllocator:
You can create your own Allocator, but there is nothing to manual assign
shards. I think there is something new in 0.20
I have googled a lot but found nothing about the logic for
allocation of shard and replica when node joins the cluster.
If it's not evenly distributed shards and replicas, can I controll
allocation of shards and replicas?
What I mean manually controll the allocation of shards and replicas
in order to making a balance.
any pointer is a great help, thanks.