Bird
Raised Fist0

You want Elasticsearch to allocate shards so that no two replicas reside in the same zone, while also balancing shards evenly across different rack attributes. Which configuration achieves this?

hard🚀 Application Q8 of Q15
Elasticsearch - Cluster Management
You want Elasticsearch to allocate shards so that no two replicas reside in the same zone, while also balancing shards evenly across different rack attributes. Which configuration achieves this?
ASet <code>cluster.routing.allocation.awareness.attributes</code> to <code>zone</code> and <code>cluster.routing.allocation.awareness.attributes</code> to <code>rack</code> separately.
BSet <code>cluster.routing.allocation.awareness.attributes</code> to <code>zone</code> and use <code>index.routing.allocation.awareness.include.rack</code> to balance racks.
CSet <code>cluster.routing.allocation.awareness.attributes</code> to <code>rack</code> only and rely on default zone balancing.
DSet <code>cluster.routing.allocation.awareness.attributes</code> to <code>zone,rack</code> and <code>cluster.routing.allocation.awareness.force.zone.values</code> to all zones.
Step-by-Step Solution
Solution:
  1. Step 1: Understand multi-attribute awareness

    To ensure replicas are separated by zone and shards balanced by rack, both attributes must be included in awareness settings.
  2. Step 2: Use combined attribute setting

    Setting cluster.routing.allocation.awareness.attributes to zone,rack enables awareness on both.
  3. Step 3: Use force values if needed

    Setting cluster.routing.allocation.awareness.force.zone.values ensures shards are allocated only on specified zones.
  4. Final Answer:

    Set cluster.routing.allocation.awareness.attributes to zone,rack and cluster.routing.allocation.awareness.force.zone.values to all zones. -> Option D
  5. Quick Check:

    Are both attributes included in one setting? Yes [OK]
Quick Trick: Combine attributes in one setting to enforce multi-level awareness [OK]
Common Mistakes:
MISTAKES
  • Setting awareness attributes separately instead of combined
  • Using index-level settings instead of cluster-level for awareness
  • Ignoring force values for strict zone allocation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes