Shard placements question after rolling restart

Hi,

I've performed a rolling restart on a 3 nodes cluster. I've a replicas of 1, 4 shards per index and during the rolling restart, rebalance actions occurring makes my cluster always available and that's a good point. However, when the latest node of the cluster have finished to reboot, I see that there is no primary shards on it, only slave. Do you think this is a desirable effect ? Is there any advantage (regarding the balancing of the load) to force the placement of primary shards more homogeneously ?

Thanks

Primary and replica shards generally do the same amount of work, so it is not necessarily an issue. One of the things where the work of primary and replica shards differ is around e.g. scripted updates to documents, where the new document id created on the primary and then replicated. If you are using a lot of updates you may want to manually reassign shards, but otherwise I would recommend leaving it as is unless you notice this resulting in uneven load.

Thanks for your reply. Is there any option to avoid manual shard re-assignation ?

You can delay reallocation when you perform a restart, which will prevent shards moving. It will however not prevent replica shards getting promoted to primary shards.

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