'Controlling where shards are allocated
My setup:
- two
zoness:fastandslowwith5nodes each. fastnodes have ephemeral storage, whereas theslownodes are NFS based.- Running Elasticsearch OSS
v7.7.1. (I have no control over the version) - I have the following cluster setting:
cluster.routing.allocation.awareness.attributes: zone - My index has 2 replicas, so 3 shard instances (1x primary, 2x replica)
I am trying to ensure the following:
- 1 of the 3 shard instances to be located in zone
fast. - 2 of the 3 shard instances to be located in zone
slow(because it has persistent storage) - Queries to be run in shard in zone
fastwhere available. - Inserts to only return as written once its written once its been replicated.
Is this setup possible?
Link to a related question: How do I control where my primary and replica shards are located?
EDIT to add extra information:
Both fast and slow nodes run on a PaaS offering where we are not in control of hardware restarts meaning there can technically be non-graceful shutdowns/restarts at any point.
I'm worried about unflushed data and/or index corruption so I am looking for multiple replicas to be on the slow zone nodes backed by NFS to reduce the likelihood of data loss, despite the fact that this will "overload" the slow zone with redundant data.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
