Elasticsearch & Lucene (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is the difference between Primary Shards and Replica Shards?
junior LevelelasticsearchBasic
In Simple Words:
- Primary Shard: A self-contained instance of a Lucene index holding a fraction of the index's total data. All document write operations route to the primary shard first.
- Replica Shard: An exact copy of a primary shard. Provides high availability (if the node holding the primary shard fails, the replica is instantly promoted to primary) and scales read throughput by serving search queries concurrently.