Recall & Review
beginner
What is a replica in Elasticsearch?
A replica is a copy of a primary shard in Elasticsearch. It provides fault tolerance and improves search performance by distributing the load.
Click to reveal answer
beginner
How do replicas improve Elasticsearch availability?
Replicas allow Elasticsearch to continue serving data even if a primary shard fails, because the replica shard can take over without data loss.
Click to reveal answer
intermediate
How can you change the number of replicas for an existing Elasticsearch index?
You can update the number of replicas using the Update Index Settings API with a command like: <br>
PUT /my_index/_settings { "index": { "number_of_replicas": 2 } }Click to reveal answer
intermediate
What happens if you set the number of replicas to 0 in Elasticsearch?
Setting replicas to 0 means there are no copies of primary shards. This reduces fault tolerance and search performance but saves disk space.
Click to reveal answer
intermediate
Can replicas be allocated on the same node as their primary shards?
No. Elasticsearch ensures replicas are allocated on different nodes than their primary shards to avoid data loss if a node fails.
Click to reveal answer
What is the main purpose of replicas in Elasticsearch?
✗ Incorrect
Replicas provide copies of primary shards on different nodes to protect against failure and improve search performance.
How do you change the number of replicas for an index?
✗ Incorrect
You update the number of replicas with the Update Index Settings API without needing to recreate the index.
If a primary shard fails, what happens to its replica shard?
✗ Incorrect
The replica shard is promoted to primary to keep the data available.
Can replicas be stored on the same node as their primary shards?
✗ Incorrect
Elasticsearch automatically places replicas on different nodes to avoid data loss.
What is a consequence of setting number_of_replicas to 0?
✗ Incorrect
With zero replicas, there are no copies of data, so if a primary shard fails, data is unavailable.
Explain what replicas are in Elasticsearch and why they are important.
Think about how Elasticsearch keeps data safe and fast to search.
You got /4 concepts.
Describe how to change the number of replicas for an existing index and what effect it has.
Consider the command to update settings and what happens after.
You got /4 concepts.