Elasticsearch disk based shard allocation tuning

Hi @warkolm , output for _cat/allocation?v is as below

shards disk.indices disk.used disk.avail disk.total disk.percent host            ip              node
   208        1.4tb     1.6tb        1tb      2.6tb           59 2.12.27.1  2.12.27.1  node1
   185        515gb   772.8gb    602.1gb      1.3tb           56 2.12.25.2  2.12.25.2  node2

if allocation is based on shard count, then in above case, if 50 new indices are created ;would all new shards get allocated to just one node ?

I have also tried the below settings in index template, and changed the weight setting in cluster - "cluster.routing.allocation.balance.index": "20.0"(tried value as 1,10,20)

    "number_of_routing_shards": "4",
    "number_of_shards": "2",
    "number_of_replicas": "0"

but still both shards of same index are allocated on same node. Can you help me resolve this so that I have 2 shards per index on separate nodes.

1 Like