Forbid primary shard on some node

Hi there,

We are deploying a elasticsearch cluster, on kubernetes (using the official helm chart).

However, we have an unresolved issue. Our usage of elasticsearch has huge variations in usage. During night, we can have less than 1req/s and during day we might go up to 1000req/s.

My plan to solve this issue was to have 2 group of node, the primary node (with contains all the primarysshard + 1 replica) and an other group of node than can scale from 0 to X and contains only replica of the shard.
However, I still can not find the option to force a group of node to contains only replica shard, and never became primary.

Does anyone have idea?

One option I was thinking was to forbid primary shard reallocation, but sometimes, we need to create new index and it might be little annoying?

How does people solve that kind of problem?

Thx a lot

Elasticsearch will allocate primary shards as required and there is generally no need to control this. Primary and replica shards do the same amount of work and if a primary shard was to be assigned to one of the transient nodes a replica would get promoted as soon as that node left the cluster.

@Christian_Dahlqvist thx for your answer, I have a specific use case maybe, I want to use EBS disk only on some nodes, (so it can be my automated backup if there is some failure), and some nodes with just locale ssd on others.

So does there is any way of doing that ? If i can not control where the primary shard are, I can not ensure that all the data (primary) will be on some node with EBS disk.

I know there is the shard allocations awareness, but there is no garante to have all the shard on those right ?

You can not control the location of the primary shard. You do not need to either. For backups you should use the snapshot API. File system backups are not supported.