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?
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.