Skip to main content
InterviewHubPRO
Section Overview
Q28

Question 28 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

56%
Elasticsearch & Lucene (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

How does the Write Path work in a distributed Elasticsearch cluster?

senior LevelSystem Design

In Simple Words:

  1. Client sends write request to any node (Coordinating Node).
  2. Coordinating node determines the Primary Shard location via hash(routing).
  3. Request forwards to node holding the Primary Shard.
  4. Primary validates the document, writes locally, and forwards the write in parallel to all in-sync Replica Shards.
  5. Once all active replicas acknowledge the write, the Primary sends success to Coordinating Node, which responds to the client.