# How to define a global default index route allocation strategy?

**URL:** <https://discuss.elastic.co/t/how-to-define-a-global-default-index-route-allocation-strategy/307093>\
**Category:** Elasticsearch\
**Created:** [June 14, 2022, 6:11am UTC](https://discuss.elastic.co/t/how-to-define-a-global-default-index-route-allocation-strategy/307093 "2022-06-14T06:11:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [June 14, 2022, 6:11am UTC](https://discuss.elastic.co/t/how-to-define-a-global-default-index-route-allocation-strategy/307093/1 "2022-06-14T06:11:10Z")

</div>

```auto
PUT filebeat-7.17.3-000001/
{
  "settings": {
    "index": {
      "lifecycle": {
        "name": "30-days-default",
        "rollover_alias": "filebeat-7.17.3"
      },
      "routing": {
        "allocation": {
          "include": {
            "_tier_preference": "data_hot,data_warm"
          },
          "require": {
            "data": "hot_warm",
            "size": "3T"
          }
        }
      }
    }
  }
}

```

I hope that all external tools can route data to the data\_hot node when writing data to  
elasticsearch. I read the documentation, the default routing node is data\_content, but I found that there is no configuration that can directly set the global definition, although it can be created through create index API or index template explicitly set **"index.routing.allocation.include.\_tier\_preference": "data\_hot"** ,  
But both approaches are post-hoc.  
For example, if I want filebeat data to be routed to data\_hot, but I want filebeat to use its own imported index template, then I need to start filebeat first, and then modify its index template. Is there a best practice?

I have seen:

> **[Cluster-level shard allocation and routing settings | Elasticsearch Guide...](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-cluster.html#enforcing-a-default-tier-preference)**

> **[Index-level data tier allocation filtering | Elasticsearch Guide \[7.17\] |...](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/data-tier-shard-filtering.html#tier-preference-allocation-filter)**

> [@Default index routing allocation](https://discuss.elastic.co/t/default-index-routing-allocation/249621):
>
> Does there is a way to force all new index, to be route to some specific nodes ? Lets say I have 8 nodes with: 6 nodes with "node.attr.group": "data" 2 nodes without group For now every times a new index, is created (automatically like .slm-history-2-000001, ilm-history-2-000001 or other kibana or metricbeats) I need to change the allocation group manually like "routing.allocation.exclude.group": "data". Does there is a way to block an index to be assigned to the data group by default ?

---

<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:** [July 12, 2022, 6:12am UTC](https://discuss.elastic.co/t/how-to-define-a-global-default-index-route-allocation-strategy/307093/2 "2022-07-12T06:12:06Z")

</div>

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