Using Elastic 7.1 stack. Trying to use hot-warm architecture. I have started all my nodes with node.attr.data set to hot or warm, depending on the node. However, I have observed that the current/active index shards are getting allocated to warm nodes as well. This I have observed for both system indexes as well as for custom indexes created via logstash 7.1
I have two questions here:
- The system indexes: I was expecting the shards for them will be allocated on hot nodes as I have added node.attr.data: hot in elasticsearch.yml file for the nodes with faster storage. Not sure how I can force that to happen
- Custom indexes: I have create ILM policy and used that in logstash elasticsearch output section. Like shown below:
if "unix_syslog" in [tags] {
elasticsearch {
hosts => ["http://host1:port","http://host2:port","http://host3:port"]
ilm_policy => test_ilm
ilm_pattern => "{now/d}-000001"
ilm_rollover_alias => "unix_syslog"
}
}
Using above setting, logstash created the index that had one primary shard on hot node and one replica on warm node. I was expecting both primary and replica will be on hot nodes. Is my expectation wrong? If yes, then how do I force active index to have both primary and replica shards on hot nodes ?
test_ilm policy:
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "1d",
"max_size": "50gb"
},
"set_priority": {
"priority": 90
}
}
},
"warm": {
"min_age": "0ms",
"actions": {
"allocate": {
"number_of_replicas": 0,
"include": {},
"exclude": {},
"require": {
"data": "warm"
}
},
"set_priority": {
"priority": 30
}
}
},
"delete": {
"min_age": "2d",
"actions": {
"delete": {}
}
}
}
}
}