Bird
Raised Fist0

If cluster.routing.allocation.awareness.attributes is set to 'zone', and nodes exist in zones 'us-east' and 'us-west', what happens if all replicas are on 'us-east' nodes?

medium📝 Predict Output Q5 of Q15
Elasticsearch - Cluster Management
If cluster.routing.allocation.awareness.attributes is set to 'zone', and nodes exist in zones 'us-east' and 'us-west', what happens if all replicas are on 'us-east' nodes?
AAllocation will fail due to zone imbalance
BElasticsearch will keep replicas on 'us-east' ignoring awareness
CElasticsearch will relocate replicas to 'us-west' nodes if available
DPrimary shards will move to 'us-west' nodes
Step-by-Step Solution
Solution:
  1. Step 1: Understand awareness attribute enforcement

    Awareness tries to balance shards across attribute values like zones to improve fault tolerance.
  2. Step 2: Analyze replica placement

    If replicas are all on 'us-east', Elasticsearch will attempt to relocate some to 'us-west' nodes to satisfy awareness.
  3. Final Answer:

    Elasticsearch will relocate replicas to 'us-west' nodes if available -> Option C
  4. Quick Check:

    Awareness balances replicas across zones = Elasticsearch will relocate replicas to 'us-west' nodes if available [OK]
Quick Trick: Awareness moves replicas to different zones automatically [OK]
Common Mistakes:
MISTAKES
  • Assuming replicas stay on same zone
  • Thinking allocation fails on imbalance
  • Believing primaries move instead of replicas

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes