Bird
Raised Fist0

Given the following index setting, what will happen when Elasticsearch allocates shards?

medium📝 Predict Output Q13 of Q15
Elasticsearch - Cluster Management
Given the following index setting, what will happen when Elasticsearch allocates shards?
{
  "settings": {
    "index.routing.allocation.awareness.include": {
      "rack_id": "rack1,rack2"
    }
  }
}
AShards will be allocated only on rack3 nodes
BShards will be allocated on any node regardless of rack_id
CShards will only be allocated on nodes with rack_id rack1 or rack2
DAllocation will fail because of invalid syntax
Step-by-Step Solution
Solution:
  1. Step 1: Understand the setting meaning

    The setting index.routing.allocation.awareness.include with rack_id values means shards should only go to nodes with those rack_ids.
  2. Step 2: Apply to given values

    Since rack1 and rack2 are included, shards will only be allocated on nodes labeled with rack1 or rack2.
  3. Final Answer:

    Shards will only be allocated on nodes with rack_id rack1 or rack2 -> Option C
  4. Quick Check:

    Allocation include rack1,rack2 = shards on rack1 or rack2 only [OK]
Quick Trick: Include means restrict allocation to listed racks [OK]
Common Mistakes:
MISTAKES
  • Thinking shards can go to any rack
  • Confusing include with exclude
  • Assuming syntax error due to JSON format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes