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:
- Determine which tiers an index's shards can be allocated to.
- 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"
}
}
}
- 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_hotso the index is targeting thewarmtier and more nodes with thedata_warmrole 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.
- In Kibana, open your deployment’s navigation menu (placed under the Elastic logo in the upper left corner) and go to Manage this deployment.
- From the right hand side, click to expand the Manage dropdown button and select Edit deployment from the list of options.
- 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.
- 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.