Primary on SSD, replica on HDD

How to configure elasticsearch to store replica on HDD, while primary data is on SSD?
I can launch two nodes, one on hdd, other on ssd, give each them tag ('hdd_node' and 'ssd_node')... What next?

1 Like

I don't think you can. I don't think you should.

Replicas are also served when querying. Having them on slow disks will globally slow down the whole process.

What you should do IMO is to move old indices to slower storage after some days.
But it's about moving all the shards, primaries and replicas.

My purpose here is to have replicas as backups in case of SSD loss. SSD is more expensive than HDD, so I do not want store replicas on them.

Then just use HDD for the whole cluster.

Why can't I just use SSD for speed, HDD for backup's?

Guess I'll have to be lucky and backup everything on HDD.

Backup and replication are 2 different things.

Replication is real-time. When you index a document, it's immediately replicated. That's the reason using a fast system for primary and a slow one for replica does not make sense as at the end of the day, it will be slow because it will have to wait for the operation to happen on the replica.

Backups are covered by Snapshot/restore feature. You can backup on slow filesystems as you wish.

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