datatiers.asciidoc 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. [role="xpack"]
  2. [[data-tiers]]
  3. == Data tiers
  4. A _data tier_ is a collection of nodes with the same data role that
  5. typically share the same hardware profile:
  6. * <<content-tier, Content tier>> nodes handle the indexing and query load for content such as a product catalog.
  7. * <<hot-tier, Hot tier>> nodes handle the indexing load for time series data such as logs or metrics
  8. and hold your most recent, most-frequently-accessed data.
  9. * <<warm-tier, Warm tier>> nodes hold time series data that is accessed less-frequently
  10. and rarely needs to be updated.
  11. * <<cold-tier,Cold tier>> nodes hold time series data that is accessed
  12. infrequently and not normally updated. To save space, you can keep
  13. <<fully-mounted,fully mounted indices>> of
  14. <<ilm-searchable-snapshot,{search-snaps}>> on the cold tier. These fully mounted
  15. indices eliminate the need for replicas, reducing required disk space by
  16. approximately 50% compared to the regular indices.
  17. * <<frozen-tier, Frozen tier>> nodes hold time series data that is accessed
  18. rarely and never updated. The frozen tier stores <<partially-mounted,partially
  19. mounted indices>> of <<ilm-searchable-snapshot,{search-snaps}>> exclusively.
  20. This extends the storage capacity even further — by up to 20 times compared to
  21. the warm tier.
  22. When you index documents directly to a specific index, they remain on content tier nodes indefinitely.
  23. When you index documents to a data stream, they initially reside on hot tier nodes.
  24. You can configure <<index-lifecycle-management, {ilm}>> ({ilm-init}) policies
  25. to automatically transition your time series data through the hot, warm, and cold tiers
  26. according to your performance, resiliency and data retention requirements.
  27. [discrete]
  28. [[content-tier]]
  29. === Content tier
  30. // tag::content-tier[]
  31. Data stored in the content tier is generally a collection of items such as a product catalog or article archive.
  32. Unlike time series data, the value of the content remains relatively constant over time,
  33. so it doesn't make sense to move it to a tier with different performance characteristics as it ages.
  34. Content data typically has long data retention requirements, and you want to be able to retrieve
  35. items quickly regardless of how old they are.
  36. Content tier nodes are usually optimized for query performance--they prioritize processing power over IO throughput
  37. so they can process complex searches and aggregations and return results quickly.
  38. While they are also responsible for indexing, content data is generally not ingested at as high a rate
  39. as time series data such as logs and metrics. From a resiliency perspective the indices in this
  40. tier should be configured to use one or more replicas.
  41. The content tier is required. System indices and other indices that aren't part
  42. of a data stream are automatically allocated to the content tier.
  43. // end::content-tier[]
  44. [discrete]
  45. [[hot-tier]]
  46. === Hot tier
  47. // tag::hot-tier[]
  48. The hot tier is the {es} entry point for time series data and holds your most-recent,
  49. most-frequently-searched time series data.
  50. Nodes in the hot tier need to be fast for both reads and writes,
  51. which requires more hardware resources and faster storage (SSDs).
  52. For resiliency, indices in the hot tier should be configured to use one or more replicas.
  53. The hot tier is required. New indices that are part of a <<data-streams,
  54. data stream>> are automatically allocated to the hot tier.
  55. // end::hot-tier[]
  56. [discrete]
  57. [[warm-tier]]
  58. === Warm tier
  59. // tag::warm-tier[]
  60. Time series data can move to the warm tier once it is being queried less frequently
  61. than the recently-indexed data in the hot tier.
  62. The warm tier typically holds data from recent weeks.
  63. Updates are still allowed, but likely infrequent.
  64. Nodes in the warm tier generally don't need to be as fast as those in the hot tier.
  65. For resiliency, indices in the warm tier should be configured to use one or more replicas.
  66. // end::warm-tier[]
  67. [discrete]
  68. [[cold-tier]]
  69. === Cold tier
  70. // tag::cold-tier[]
  71. When you no longer need to search time series data regularly, it can move from
  72. the warm tier to the cold tier. While still searchable, this tier is typically
  73. optimized for lower storage costs rather than search speed.
  74. For better storage savings, you can keep <<fully-mounted,fully mounted indices>>
  75. of <<ilm-searchable-snapshot,{search-snaps}>> on the cold tier. Unlike regular
  76. indices, these fully mounted indices don't require replicas for reliability. In
  77. the event of a failure, they can recover data from the underlying snapshot
  78. instead. This potentially halves the local storage needed for the data. A
  79. snapshot repository is required to use fully mounted indices in the cold tier.
  80. Fully mounted indices are read-only.
  81. Alternatively, you can use the cold tier to store regular indices with replicas instead
  82. of using {search-snaps}. This lets you store older data on less expensive hardware
  83. but doesn't reduce required disk space compared to the warm tier.
  84. // end::cold-tier[]
  85. [discrete]
  86. [[frozen-tier]]
  87. === Frozen tier
  88. // tag::frozen-tier[]
  89. Once data is no longer being queried, or being queried rarely, it may move from
  90. the cold tier to the frozen tier where it stays for the rest of its life.
  91. The frozen tier requires a snapshot repository.
  92. The frozen tier uses <<partially-mounted,partially mounted indices>> to store
  93. and load data from a snapshot repository. This reduces local storage and
  94. operating costs while still letting you search frozen data. Because {es} must
  95. sometimes fetch frozen data from the snapshot repository, searches on the frozen
  96. tier are typically slower than on the cold tier.
  97. // end::frozen-tier[]
  98. [discrete]
  99. [[configure-data-tiers-cloud]]
  100. === Configure data tiers on {ess} or {ece}
  101. The default configuration for an {ecloud} deployment includes a shared tier for
  102. hot and content data. This tier is required and can't be removed.
  103. To add a warm, cold, or frozen tier when you create a deployment:
  104. . On the **Create deployment** page, click **Advanced Settings**.
  105. . Click **+ Add capacity** for any data tiers to add.
  106. . Click **Create deployment** at the bottom of the page to save your changes.
  107. [role="screenshot"]
  108. image::images/data-tiers/ess-advanced-config-data-tiers.png[{ecloud}'s deployment Advanced configuration page,align=center]
  109. To add a data tier to an existing deployment:
  110. . Log in to the {ess-console}[{ecloud} console].
  111. . On the **Deployments** page, select your deployment.
  112. . In your deployment menu, select **Edit**.
  113. . Click **+ Add capacity** for any data tiers to add.
  114. . Click **Save** at the bottom of the page to save your changes.
  115. To remove a data tier, refer to {cloud}/ec-disable-data-tier.html[Disable a data
  116. tier].
  117. [discrete]
  118. [[configure-data-tiers-on-premise]]
  119. === Configure data tiers for self-managed deployments
  120. For self-managed deployments, each node's <<data-node,data role>> is configured
  121. in `elasticsearch.yml`. For example, the highest-performance nodes in a cluster
  122. might be assigned to both the hot and content tiers:
  123. [source,yaml]
  124. ----
  125. node.roles: ["data_hot", "data_content"]
  126. ----
  127. NOTE: We recommend you use <<data-frozen-node,dedicated nodes>> in the frozen
  128. tier.
  129. [discrete]
  130. [[data-tier-allocation]]
  131. === Data tier index allocation
  132. When you create an index, by default {es} sets
  133. <<tier-preference-allocation-filter, `index.routing.allocation.include._tier_preference`>>
  134. to `data_content` to automatically allocate the index shards to the content tier.
  135. When {es} creates an index as part of a <<data-streams, data stream>>,
  136. by default {es} sets
  137. <<tier-preference-allocation-filter, `index.routing.allocation.include._tier_preference`>>
  138. to `data_hot` to automatically allocate the index shards to the hot tier.
  139. You can explicitly set `index.routing.allocation.include._tier_preference`
  140. to opt out of the default tier-based allocation.
  141. [discrete]
  142. [[data-tier-migration]]
  143. === Automatic data tier migration
  144. {ilm-init} automatically transitions managed
  145. indices through the available data tiers using the <<ilm-migrate, migrate>> action.
  146. By default, this action is automatically injected in every phase.
  147. You can explicitly specify the migrate action with `"enabled": false` to disable automatic migration,
  148. for example, if you're using the <<ilm-allocate, allocate action>> to manually
  149. specify allocation rules.