Allocate index on the hot _tier

hey there,
I was trying to use ILM policies with a hot/warm/cold infrastructure. My indices are not data stream so I have to bootstrap the index with an alias.
Is there a way to assign it at the _hot tier nodes at the beginning? When I create the index test-00001 it is distributed over all the nodes.

In this moment I am using this scenario:
node1: [master, data_hot, data_content]
node2: [master, data_warm, data_content]
node3: [master, data_cold, data_content]

What does your policy look like?

PUT _ilm/policy/test
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "50gb",
            "max_age": "30d",
            "max_docs": 3
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "0ms",
        "actions": {
          "set_priority": {
            "priority": 50
          }
        }
      },
      "delete": {
        "min_age": "3m",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

while my index_template

PUT _index_template/test_indices
{
  "index_patterns": ["test-*"],
  "template": {
    "settings": {
        "index.lifecycle.name" : "test",
        "index.lifecycle.rollover_alias": "test"
    }
  }
}

it looks very simple. probably should I have only data_content role on the same data_hot _tier?

Is there a way to assign it at the _hot tier nodes at the beginning? When I create the index test-00001 it is distributed over all the nodes.

As you're not using data streams, the new test-* indices will get allocated to the content tier, the nodes configured with the data_content role - which in your configuration are all the nodes in your cluster.
You could configure only the data_hot node to also contain the data_content node role.
Or to opt out of the default tier-based allocation you can explicitly set index.routing.allocation.include._tier_preference: data_hot in your index template.

at the end, I will configure the data_hot nodes to contain also data_content

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