Challenge - 5 Problems
Shard and Replica Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate1:00remaining
What is the default number of primary shards for a new Elasticsearch index?
By default, when you create a new index in Elasticsearch without specifying shard settings, how many primary shards does it have?
Attempts:
2 left
💡 Hint
Think about the default shard count Elasticsearch uses for balancing data.
✗ Incorrect
Elasticsearch creates 5 primary shards by default for each new index unless specified otherwise.
❓ query_result
intermediate1:00remaining
How many replicas are created by default for an Elasticsearch index?
When you create an index in Elasticsearch without specifying replica settings, how many replica shards are created by default?
Attempts:
2 left
💡 Hint
Replicas provide fault tolerance and improve search performance.
✗ Incorrect
By default, Elasticsearch creates 1 replica shard for each primary shard.
📝 Syntax
advanced1:30remaining
Which JSON snippet correctly sets an index with 3 primary shards and 2 replicas?
Select the valid JSON configuration to create an Elasticsearch index with 3 primary shards and 2 replicas.
Attempts:
2 left
💡 Hint
Look for the exact keys Elasticsearch expects for shard settings.
✗ Incorrect
Elasticsearch expects the keys 'number_of_shards' and 'number_of_replicas' with integer values.
🧠 Conceptual
advanced1:30remaining
Why should you avoid setting the number of primary shards too high for a small index?
What is the main reason to avoid configuring too many primary shards for a small Elasticsearch index?
Attempts:
2 left
💡 Hint
Think about resource use and efficiency.
✗ Incorrect
Too many shards for small data cause unnecessary resource use and slow cluster operations.
🔧 Debug
expert2:00remaining
What error occurs if you try to set number_of_shards to 0 when creating an index?
You run this command to create an index with zero primary shards:
{
"settings": {
"number_of_shards": 0,
"number_of_replicas": 1
}
}
What error will Elasticsearch return?
Attempts:
2 left
💡 Hint
Primary shards must be at least one for an index to exist.
✗ Incorrect
Elasticsearch requires at least one primary shard; zero is invalid and triggers a validation error.