We have created elasticsearch cluster with 4 nodes which is distributed in two subnets of aws with all the nodes with the role assigned as master, data, ingest and. It was all discovered and master node is elected. While data ingest all the nodes are used and data ingestion correctly. But when we query the elasticsearch service only 2 nodes are utilized (1 is the master and another node in the same subnet) but other 2 nodes in second subnet are not getting used even there is any heavy usage on the first 2 nodes.
When we have all the node under one subnet then all the server are getting used equally. I can't get the root cause of this issue.
Elasticsearch prefers using shards in the same location (with the same awareness attribute values) to process search or GET requests.
If you do not want this behaviour then you can disable it by adding another awareness attribute which only has one value across the whole cluster, e.g.
This will have no effect on shard allocation but will route searches across the whole cluster.
In 7.5.0 and later you can set the system property es.routing.search_ignore_awareness_attributes to true instead, and in 8.0.0 this will be the default behaviour.
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.