# Allocate index on the hot \_tier

**URL:** <https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 19, 2021, 2:33pm UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420 "2021-05-19T14:33:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [May 19, 2021, 2:33pm UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/1 "2021-05-19T14:33:52Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 20, 2021, 1:40am UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/2 "2021-05-20T01:40:38Z")

</div>

What does your policy look like?

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [May 20, 2021, 7:25am UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/3 "2021-05-20T07:25:47Z")

</div>

```
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?

---

<div class="post-metadata">

**Author:** ![andreidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreidan/32/78167_2.png) [@andreidan](https://discuss.elastic.co/u/andreidan)\
**Post date:** [May 24, 2021, 5:52pm UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/4 "2021-05-24T17:52:46Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [May 24, 2021, 6:12pm UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/5 "2021-05-24T18:12:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 21, 2021, 6:12pm UTC](https://discuss.elastic.co/t/allocate-index-on-the-hot-tier/273420/6 "2021-06-21T18:12:44Z")

</div>

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