Setting replicas in Elasticsearch
- The links to Elastic documentation may not match your Elastic deployment version. For accurate information, check and select the right documentation for your version.
- For other external documentation, always refer to the latest version provided to ensure up-to-date information.
To ensure high availability of data within your Elasticsearch cluster, we recommend the best practice of configuring at least one replica for each primary shard.
By default, Elastic sets index.number_of_replicasto 1.
If index.number_of_replicas is set to 0, you may experience any of the following:
- temporary availability loss when a node restarts.
- permanent data loss due to data corruption.
If you experience any of the above issues, ensure index.number_of_replicas is set to at least 1.