Shards allocation method

how shards are allocated in cluster nodes?
for the below scenario could anyone explain ?
for 3node cluster 3primary shards and 2 replica shards configured.
i have to configure my nodes with same storage ? how this storages are calculated in nodes?

and if i config 3 primary shards for cluster it will take same space in all nodes and we need to more stoarge. is it possible to to specify the shards to store with in specific nodes

If you have 2 replica shards for every primary and a 3 node cluster all nodes will hold all data as they will hold either a primary or replica of every shard. You can check this using the cat shards API. When you vary the number of primary shards you are just changing the size of the buckets you store data in, not the volume of data being stored so the size should be roughly the same. There are some economies of scale with larger shards but I would expect the difference between 1, 2 and 3 primary shards to be small due to this.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.