Elasticsearch Elasticsearch Indices Without Replicas

By Opster Expert Team

Updated: Jul 4, 2023

| 2 min read

Before you dig into the details of this technical guide, have you tried asking OpsGPT?

You'll receive concise answers that will help streamline your Elasticsearch/OpenSearch operations.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch/ OpenSearch operation.

Before you dig into the details of this guide, have you tried asking OpsGPT? You’ll receive concise answers that will help streamline your OpenSearch/Elasticsearch operation.

Try OpsGPT now for step-by-step guidance and tailored insights into your search operation.

To easily resolve issues in your deployment and locate their root cause, try AutoOps for OpenSearch. It diagnoses problems by analyzing hundreds of metrics collected by a lightweight agent and offers guidance for resolving them. Try AutoOps for free.

What does this mean?

Elasticsearch indices may not have replica shards. Replica shards are crucial for providing resilience and load balancing in an Elasticsearch cluster.

This issue is monitored by Opster AutoOps in real-time with personalized recommendations provided for your own system. You can also configure notifications to avoid this issue forming in the future.

Why does this occur?

This issue can occur due to various reasons, such as:

  1. The cluster was initially set up with a single node, and no replicas were created.
  2. The number of replicas was explicitly set to zero during index creation.
  3. The cluster experienced a failure, and the replicas were not automatically recreated.

Possible impact and consequences of indices without replicas

The absence of replicas can lead to the following impacts:

1. Data loss: In the event of data corruption or loss of a data node, a replica shard would be promoted to become the primary shard. Without replicas, this will not happen, and you may need to restore the index from a snapshot (if available).

2. Search latency: Replicas provide alternative sources of data to balance the load of search operations across the nodes in the cluster. Without replicas, search operations may experience increased latency as they have no alternative sources of data.

How to resolve

To resolve the issue of indices having no replicas, follow these recommendations:

1. Add a data node: If your cluster has only one data node, consider adding more data nodes to distribute the load and allow for replica creation.

2. Add replicas for indices: Update the index settings to include replicas. You can do this using the following command:

PUT /_all/_settings
  "index" : {
    "number_of_replicas" : 1

This command sets the number of replicas to 1 for all indices. You can replace “_all” with a specific index name if you want to update the replica count for a particular index. 

Generally, you don’t need to add replicas to indices located on cold and frozen nodes as those indices are sourced from snapshots and if a primary shard goes missing it can easily be restored from the snapshot. Also, those cold and frozen indices are usually not searched very frequently, and hence, don’t need to be highly available.


By addressing this issue and ensuring that your indices have replicas, you can prevent data loss and maintain optimal search performance in your Elasticsearch cluster.

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Get expert answers on Elasticsearch/OpenSearch