Multiple primary shards and how this work on multiple node


(trem k) #1

Hello

In elasticsearch we can have multiple primary shards i.e by default we have 5 primary shards for one index.

How elasticsearch store 5 primary shard, i.e if i have 3 nodes in the clusters and create an index with 5 primary shards and no replica shards?
will elasticsearch store 2 in node 1, 1 in node 2, and 2 in node 3?

If elasticsearch store primary shards in different nodes, what will happen if some node down?
i.e if node 1 down, it mean index will broken and not usable?

thanks


(Christian Dahlqvist) #2

Yes, the available shards will be spread out automatically across the available data nodes. If you have no replicas configured, some of the shards will be unavailable for reading and writing if you lose or have problems with any of the nodes node. This is why using at least one replica is recommended for a production cluster.


(system) #3

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