Loading

Add a preferred data tier to a deployment

Stack

In an Elasticsearch deployment, an index and its shards can be allocated to data tiers using routing and allocation settings.

To allow indices to be allocated, follow these steps:

  1. Determine which tiers an index's shards can be allocated to.
  2. Resize your deployment.

You can run the following step using either API console or direct Elasticsearch API calls.

To determine which tiers an index's shards can be allocated to, use the get index setting API to retrieve the configured value for the index.routing.allocation.include._tier_preference setting:

				GET /my-index-000001/_settings/index.routing.allocation.include._tier_preference?flat_settings
		

The response looks like this:

{
  "my-index-000001": {
    "settings": {
      "index.routing.allocation.include._tier_preference": "data_warm,data_hot"
    }
  }
}
		
  1. Represents a comma-separated list of data tier node roles this index is allowed to be allocated on, the first one in the list being the one with the higher priority i.e. the tier the index is targeting. e.g. in this example the tier preference is data_warm,data_hot so the index is targeting the warm tier and more nodes with the data_warm role are needed in the Elasticsearch cluster.

To enable a new tier in your Elastic Cloud Hosted deployment, you edit the deployment topology to add a new data tier.

  1. In Kibana, open your deployment’s navigation menu (placed under the Elastic logo in the upper left corner) and go to Manage this deployment.
  2. From the right hand side, click to expand the Manage dropdown button and select Edit deployment from the list of options.
  3. On the Edit page, click on + Add Capacity for the tier you identified you need to enable in your deployment. Choose the desired size and availability zones for the new tier.
  4. Navigate to the bottom of the page and click the Save button.

Add more nodes to your Elasticsearch cluster and assign the index’s target tier node role to the new nodes, by adjusting the configuration in elasticsearch.yml.

Add more nodes to your Elasticsearch cluster and assign the index’s target tier node role to the new nodes, by adjusting the node configuration in the spec section of your Elasticsearch resource manifest.