0
0
Elasticsearchquery~5 mins

Replica management in Elasticsearch - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ATo provide fault tolerance and improve search speed
BTo store backup data on the same node
CTo reduce the number of shards
DTo increase indexing speed only
How do you change the number of replicas for an index?
AUsing the Update Index Settings API
BBy deleting and recreating the index
CBy changing the cluster settings only
DBy restarting Elasticsearch
If a primary shard fails, what happens to its replica shard?
AIt is deleted automatically
BIt remains inactive
CIt becomes the new primary shard
DIt merges with other shards
Can replicas be stored on the same node as their primary shards?
AYes, always on the same node
BNo, replicas are stored on different nodes
COnly if manually configured
DOnly for small clusters
What is a consequence of setting number_of_replicas to 0?
AIndexing speed decreases
BMore disk space is used
CSearch performance improves
DNo replicas exist, reducing fault tolerance
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.