I have a 5 node Elasticsearch cluster of version 5.2.1. It consist of 3 master and 2 data node. I defined no.of shards as 7 and replica as 1.
With this setting sometimes my shards health are going to yellow status. Which causing Elasticsearch timeout issue when I access Kibana I doubt it whether the number of shards causing this issue.
Is there any formula to identify number of shards based on the nodes in the cluster? . Please provide your insights.
How many shards do you have in the cluster? What is the average shard size?
As you have only 2 data nodes (the only nodes that hold shards) both nodes will hold a copy of all data as you have 1 replica configured. I would recommend reading this blog post for some practical guidance on shard count and size.
If you want to see how shards are distributed across the cluster, you can use the cat shards API. Is there anything in the Elasticsearch logs about the yellow status you mentioned?
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.