Bird
Raised Fist0

What happens internally in Elasticsearch if you set number_of_replicas to a value higher than the number of available data nodes?

hard🧠 Conceptual Q10 of Q15
Elasticsearch - Performance and Scaling

What happens internally in Elasticsearch if you set number_of_replicas to a value higher than the number of available data nodes?

AThe cluster throws an error and refuses to start
BElasticsearch automatically reduces replicas to match node count
CPrimary shards are duplicated instead of replicas
DReplica shards remain unassigned until more nodes are added
Step-by-Step Solution
Solution:
  1. Step 1: Understand shard allocation behavior

    Replica shards cannot be allocated on the same node as primary shards.
  2. Step 2: Effect of setting replicas higher than nodes

    Excess replicas remain unassigned until cluster has enough nodes.
  3. Final Answer:

    Replica shards remain unassigned until more nodes are added -> Option D
  4. Quick Check:

    Too many replicas = unassigned shards [OK]
Quick Trick: Excess replicas stay unassigned without enough nodes [OK]
Common Mistakes:
MISTAKES
  • Thinking Elasticsearch auto-adjusts replica count
  • Confusing primary shard duplication with replicas
  • Assuming cluster refuses to start on replica mismatch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes