Elasticsearch & Lucene (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
How does Elasticsearch achieve High Availability during node failure?
senior LevelSystem Design
In Simple Words:
- Elasticsearch ensures that a primary shard and its corresponding replica are never placed on the same physical node.
- If Node A holding Primary Shard 0 crashes:
- The Master node detects the heartbeat timeout.
- The Master immediately promotes the Replica Shard 0 on Node B to be the new Primary Shard.
- The cluster creates a new replacement replica shard on another healthy node to restore target redundancy.