Assign primary shards to specifc set of nodes

Hey there,

I have an ES 6.2 cluster consisting of preemptible and non-preemptible-nodes on gcloud (preemptible nodes can re-start at any point in time). The idea here is to have a (smaller) set of nodes which do not restart and a larger set of nodes which can restart. To ensure data-correctness, the non-preemptible nodes should always contain all primary-shards, thus always guaranteeing availability of the full-dataset. Replica-shards may go to any node (as long as it is balanced).

I did however, not find any setting which differentiates for shard-allocation based on it being a primary or a duplicate shard. Shard-Allocation seems to only work index-based, not shard-based.

Is it possible to assign primary-shards only to a specific set of nodes?

No, it is not possible to control placement of primary shards. Elasticsearch can promote any replica to primary when needed, so this can change over time.

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