How does Allocation of shards happens, when a node leaves cluster?

I want to know the exact procedure followed, for the allocation of shards on a node when the node leaves the cluster. Facts I know -
1.) ES waits for sometime before the reassigning the shards.
2.) For primary shards, a valid replica is searched for and then the replica is promoted to primary.

Questions I have
1.) Which allocator specifically handles this scenario?(BalancedShardAllocator/GatewayAllocator or some other?)
2.) What happens to replica shards, are they dropped or allocated to some other node..


  1. GatewayAllocator
  2. Assigned replicas are left where they are. Unassigned replicas are assigned normally.

Thanks for your kind reply,
Can you provide me with link of some blog or post where I can read in depth about the allocation of shards in depth.

I don't think there is a blog post that goes into this level of detail. You'll need to read the source code.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.