Troubleshooting the elastic seach node

I am new to Elasticsearch and we have 2 node ES cluster with the following health

{
  "cluster_name" : "some.xyz",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 7076,
  "active_shards" : 14152,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
What is wrong with my cluster configuration and what are the best practices to fix these.

What is the full output of the cluster stats API?

Based on the limited data you have provided there are two things that stand out as not necessarily being inline with best practices:

  1. You only have 2 nodes in the cluster. In order to achieve high availability and increased resiliency you need a minimum of 3 master eligible nodes. The reasons nehind this is outlined in the documentation.
  2. Unless your nodes hold an immense amount of data you appear to have a very large number of small shards which is inefficient and can cause problems with stability and performance. This has improved in Elasticsearch 8.x but I would still recommend you read and follow the advice provided in the documentation. If you are on an older version this is something you need to fix with some urgency.

What is the issue? Your cluster is green, not sure what is the issue you are referring to.

1 Like