Elasticsearch index.routing.allocation.exclude._tier Setting

The index.routing.allocation.exclude._tier setting in Elasticsearch controls which data tiers an index should not be allocated to. It is part of the index-level settings that manage the placement of index shards across different types of nodes in a cluster.

  • Default value: Not set
  • Possible values: Comma-separated list of tier names (e.g., "data_hot,data_warm,data_cold,data_frozen")
  • Recommendations: Use this setting in conjunction with data tiers and Index Lifecycle Management (ILM) policies to optimize data placement based on performance and cost requirements.

This setting is available from Elasticsearch version 7.10.0 onwards, coinciding with the introduction of data tiers.

Example

To exclude an index from being allocated to the "data_cold" and "data_frozen" tiers:

PUT /my-index/_settings
{
  "index": {
    "routing": {
      "allocation": {
        "exclude": {
          "_tier": "data_cold,data_frozen"
        }
      }
    }
  }
}

This change would ensure that the index "my-index" is only allocated to nodes in the hot or warm tiers, which is useful for maintaining faster access to more frequently accessed data.

Common Issues or Misuses

  • Overusing exclusions can lead to unbalanced cluster allocation if not carefully managed.
  • Excluding all available tiers can prevent index allocation entirely.
  • Forgetting to update this setting when changing the cluster's tier structure can lead to unexpected allocation behavior.

Do's and Don'ts

  • Do use this setting in conjunction with ILM policies for automated data lifecycle management.
  • Do consider the performance implications of your tier allocation strategy.
  • Don't exclude tiers without ensuring there are sufficient resources in the remaining tiers.
  • Don't forget to review and update these settings when modifying your cluster's architecture.

Frequently Asked Questions

Q: How does index.routing.allocation.exclude._tier differ from index.routing.allocation.include._tier?
A: While exclude._tier specifies tiers where the index should not be allocated, include._tier defines tiers where the index should be allocated. Using include._tier is generally preferred as it's more explicit about where data should reside.

Q: Can I use this setting with older versions of Elasticsearch?
A: No, this setting is only available from Elasticsearch 7.10.0 onwards, as it's tied to the data tiers feature introduced in that version.

Q: How does this setting interact with Index Lifecycle Management (ILM)?
A: ILM policies can automatically adjust this setting as part of phase transitions, moving data through different tiers based on age or other criteria.

Q: What happens if I exclude all available tiers?
A: If all available tiers are excluded, the index will not be allocated to any nodes, potentially causing issues with data availability and cluster health.

Q: Can I use this setting to move an index between tiers manually?
A: While you can use this setting to influence where an index is allocated, it's generally better to use ILM or the move to data tier API for controlled transitions between tiers.

Subscribe to the Pulse Newsletter

Get early access to new Pulse features, insightful blogs & exclusive events , webinars, and workshops.

We use cookies to provide an optimized user experience and understand our traffic. To learn more, read our use of cookies; otherwise, please choose 'Accept Cookies' to continue using our website.