Bird
0
0

Given this index setting snippet:

medium📝 query result Q4 of 15
Elasticsearch - Index Management
Given this index setting snippet:
{ "settings": { "number_of_shards": 2, "number_of_replicas": 1 } }

How many shards will be active if one node fails in a 2-node cluster?
A4 shards active
B3 shards active
C2 shards active
D1 shard active
Step-by-Step Solution
Solution:
  1. Step 1: Calculate total shards and replicas

    There are 2 primary shards and 1 replica each, so total 4 shards.
  2. Step 2: Understand shard availability on node failure

    With 2 nodes, if one fails, only primary shards remain active (2 shards). Replicas on the failed node become unavailable.
  3. Final Answer:

    2 shards active -> Option C
  4. Quick Check:

    Node failure disables replicas on that node [OK]
Quick Trick: Replicas lost if node fails; primaries stay active [OK]
Common Mistakes:
MISTAKES
  • Counting replicas as active after node failure
  • Assuming replicas auto-promote immediately
  • Ignoring cluster node count impact

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes