We have a cluster that will contain a mix of hosts, some with spinning disks and some with SSDs.
We would like to index only to the hosts with spinning disks, and serve queries only from the hosts with SSDs.
How can we force primary shards to only be on the hosts with spinning disks, and replica shards to only be on hosts with SSDs?
I can see it's possible to influence where any shards of an index, both primary and replica, go, but can't see a way to distinguish where shards go on the basis of them being primary or replica.
I realise that - if it is indeed possible to route shards on this basis - in the case of a failure, it's likely that a primary may have to go to a SSD host and/or a replica may have to go to a spinning disk host, and therefore maybe this is not possible at all. But any ideas welcomed.