Total number of shards

Hi Guys,

i have an elastic cluster with 5 nodes. This cluster is configured 1290 indices, all indices is configured to have 2 primary shards and 1 replica shard.

For me the cluster should have 3*1290=3870 shards but actually has 4952 shards (2476 primary and 2476 replica) and is close to the limit of 5000.

What is wrong with the number of shards?

Thanks for the help.

Can you share the template you are using? If you have number_of_shards set to 2 and number_of_replicas set to 1, this means that each primary shard will have a replica, so you will have 4 shards for this index.

This does not see right, as mentioned if you configure to have 2 primary shards and 1 replica, each primary will have one replica, so each index will have for shard.

For example, you will have p0, p1 as the primary shards and r0 and r1 as their respective replicas.

What is the result of GET _cat/shards?v on Kibana Dev Tools? Can you share it here or on a Github Gist?

1 Like

Hi Leandro,

thanks for the explanation, now i understand the meaning of number_of_replicas. I thought it was the implicit number of replica shards but it means the number of replicas for every primary.
Now it make sense to me.

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