| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 | [role="xpack"][[data-tiers]]== Data tiersA _data tier_ is a collection of nodes with the same data role thattypically share the same hardware profile:* <<content-tier, Content tier>> nodes handle the indexing and query load for content such as a product catalog.* <<hot-tier, Hot tier>> nodes handle the indexing load for time series data such as logs or metricsand hold your most recent, most-frequently-accessed data.* <<warm-tier, Warm tier>> nodes hold time series data that is accessed less-frequentlyand rarely needs to be updated.* <<cold-tier, Cold tier>> nodes hold time series data that is accessed infrequently and not normally updated.* <<frozen-tier, Frozen tier>> nodes hold time series data that is accessed rarely and never updated, kept in searchable snapshots.When you index documents directly to a specific index, they remain on content tier nodes indefinitely.When you index documents to a data stream, they initially reside on hot tier nodes.You can configure <<index-lifecycle-management, {ilm}>> ({ilm-init}) policiesto automatically transition your time series data through the hot, warm, and cold tiersaccording to your performance, resiliency and data retention requirements.A node's <<data-node, data role>> is configured in `elasticsearch.yml`.For example, the highest-performance nodes in a cluster might be assigned to both the hot and content tiers:[source,yaml]--------------------------------------------------node.roles: ["data_hot", "data_content"]--------------------------------------------------[discrete][[content-tier]]=== Content tierData stored in the content tier is generally a collection of items such as a product catalog or article archive.Unlike time series data, the value of the content remains relatively constant over time,so it doesn't make sense to move it to a tier with different performance characteristics as it ages.Content data typically has long data retention requirements, and you want to be able to retrieveitems quickly regardless of how old they are.Content tier nodes are usually optimized for query performance--they prioritize processing power over IO throughputso they can process complex searches and aggregations and return results quickly.While they are also responsible for indexing, content data is generally not ingested at as high a rateas time series data such as logs and metrics. From a resiliency perspective the indices in thistier should be configured to use one or more replicas.The content tier is required. System indices and other indices that aren't partof a data stream are automatically allocated to the content tier.[discrete][[hot-tier]]=== Hot tierThe hot tier is the {es} entry point for time series data and holds your most-recent,most-frequently-searched time series data.Nodes in the hot tier need to be fast for both reads and writes,which requires more hardware resources and faster storage (SSDs).For resiliency, indices in the hot tier should be configured to use one or more replicas.The hot tier is required. New indices that are part of a <<data-streams,data stream>> are automatically allocated to the hot tier.[discrete][[warm-tier]]=== Warm tierTime series data can move to the warm tier once it is being queried less frequentlythan the recently-indexed data in the hot tier.The warm tier typically holds data from recent weeks.Updates are still allowed, but likely infrequent.Nodes in the warm tier generally don't need to be as fast as those in the hot tier.For resiliency, indices in the warm tier should be configured to use one or more replicas.[discrete][[cold-tier]]=== Cold tierWhen data is no longer being updated, it can move from the warm tier to the coldtier where it stays while being queried infrequently. As data transitions intothe cold tier, it can be compressed and shrunken. Instead of using replicas, thecold tier can use <<fully-mounted,fully mounted indices>> of<<ilm-searchable-snapshot,{search-snaps}>> for resiliency, eliminating the needfor replicas. The cold tier is still a responsive query tier, but data becomesread-only.[discrete][[frozen-tier]]=== Frozen tierOnce data is no longer being queried, or being queried rarely, it may move fromthe cold tier to the frozen tier where it stays for the rest of its life.The frozen tier uses <<partially-mounted,partially mounted indices>> to storeand load data from a snapshot repository. This reduces local storage andoperating costs while still letting you search frozen data. Because {es} mustsometimes fetch frozen data from the snapshot repository, searches on the frozentier are typically slower than on the cold tier.NOTE: We recommend you use <<data-frozen-node,dedicated nodes>> in the frozentier.[discrete][[data-tier-allocation]]=== Data tier index allocationWhen you create an index, by default {es} sets<<tier-preference-allocation-filter, `index.routing.allocation.include._tier_preference`>>to `data_content` to automatically allocate the index shards to the content tier.When {es} creates an index as part of a <<data-streams, data stream>>,by default {es} sets<<tier-preference-allocation-filter, `index.routing.allocation.include._tier_preference`>>to `data_hot` to automatically allocate the index shards to the hot tier.You can explicitly set `index.routing.allocation.include._tier_preference`to opt out of the default tier-based allocation.[discrete][[data-tier-migration]]=== Automatic data tier migration{ilm-init} automatically transitions managedindices through the available data tiers using the <<ilm-migrate, migrate>> action.By default, this action is automatically injected in every phase.You can explicitly specify the migrate action with `"enabled": false` to disable automatic migration,for example, if you're using the <<ilm-allocate, allocate action>> to manuallyspecify allocation rules.
 |