0
0
Elasticsearchquery~5 mins

Shard allocation awareness in Elasticsearch - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is shard allocation awareness in Elasticsearch?
Shard allocation awareness is a feature that helps Elasticsearch place shards on different nodes based on specific attributes, like rack or zone, to improve fault tolerance and availability.
Click to reveal answer
beginner
Why is shard allocation awareness important?
It ensures that copies of data (shards) are spread across different physical locations or failure domains, so if one location fails, data remains available from another.
Click to reveal answer
intermediate
How do you configure shard allocation awareness in Elasticsearch?
You set node attributes (like zone or rack) and then configure cluster.routing.allocation.awareness.attributes with those attribute names to tell Elasticsearch to spread shards accordingly.
Click to reveal answer
intermediate
What happens if Elasticsearch cannot satisfy shard allocation awareness rules?
Elasticsearch may delay shard allocation or allocate shards on the same attribute value, risking reduced fault tolerance until the cluster state changes.
Click to reveal answer
beginner
Example: If nodes have attribute zone with values zone1 and zone2, how does shard allocation awareness use this?
Elasticsearch tries to place primary and replica shards on nodes in different zones, so if zone1 fails, data is still available in zone2.
Click to reveal answer
What does shard allocation awareness help prevent?
AMore shards per node
BAll shard copies being on the same failure domain
CFaster indexing speed
DAutomatic data backup to cloud
Which Elasticsearch setting controls shard allocation awareness?
Acluster.shard.allocation.awareness
Bnode.attr.shard.awareness
Cindex.shard.awareness.enabled
Dcluster.routing.allocation.awareness.attributes
If you want to spread shards across data centers, what should you do?
AIncrease number of shards
BDisable shard allocation awareness
CSet node attributes for data center and use shard allocation awareness
DUse only one node
What is a node attribute in Elasticsearch shard allocation awareness?
AA label assigned to a node to group it by physical or logical location
BThe number of shards on a node
CThe IP address of the node
DThe node's CPU speed
What happens if all nodes share the same attribute value in shard allocation awareness?
AElasticsearch may place all shards on the same attribute value, reducing fault tolerance
BElasticsearch refuses to allocate shards
CShards are automatically deleted
DShard allocation awareness is ignored
Explain shard allocation awareness and why it matters in Elasticsearch.
Think about how Elasticsearch keeps data safe across different physical locations.
You got /3 concepts.
    Describe how to configure shard allocation awareness in an Elasticsearch cluster.
    Consider what labels you give nodes and how Elasticsearch uses them.
    You got /3 concepts.