Primary shard allocation

After I rebooted one of my elasticsearch nodes, it looks like all the primary shards are always assigned to the same node, although in the past the primary shards were assigned equally between the three.
How can i fix it?


I think it is not a problem. Do you have performance problems?
Another thing, try to keep the shards size between 20 and 40 GB. You waste a lot of memory with many little shards.
You van check the cluster status via elasticsearch API.

Thanks for the reply.
Are you sure that it is not a problem? Doesn’t it mean that all the searches will be against this node ? it can cause performance issues? if not what is the actual difference between primary and replica?
Anyway, I would like to know how can I change it for my general knowledge.
Thanks again.


  1. Maybe it could be, but I don’t think so. Check your elastic cluster.
  2. There is NO difference between the primary and replica shards, just to type. All two contains the SAME data,( First google hit for “elasticsearch primary replica shards” ) so
  3. the cluter can do searches on the replica shards too.
  4. If all primary in one server, it can cause performance problem, but your indices only 1,8GB, it’s not too much write for one node. Check you servers usage, and do changes if they are under heavy load.
  5. Here is the first google hit for “elasticsearch relocate shards”.

Are you sure you need 8*3 shards in one index? If it’s a daily indices, I suggest only one shard, with one replica. The many little shards kill elastic mem usage.

Google is a wonderful tool, use it.

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