datatiers.asciidoc 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. [role="xpack"]
  2. [[data-tiers]]
  3. === Data tiers
  4. Common data lifecycle management patterns revolve around transitioning indices
  5. through multiple collections of nodes with different hardware characteristics in order
  6. to fulfil evolving CRUD, search, and aggregation needs as indices age. The concept
  7. of a tiered hardware architecture is not new in {es}.
  8. <<index-lifecycle-management, Index Lifecycle Management>> is instrumental in
  9. implementing tiered architectures by automating the managemnt of indices according to
  10. performance, resiliency and data retention requirements.
  11. <<overview-index-lifecycle-management, Hot/warm/cold>> architectures are common
  12. for timeseries data such as logging and metrics.
  13. A data tier is a collection of nodes with the same role. Data tiers are an integrated
  14. solution offering better support for optimising cost and improving performance.
  15. Formalized data tiers in ES allow configuration of the lifecycle and location of data
  16. in a hot/warm/cold topology without requiring the use of custom node attributes.
  17. Each tier formalises specific characteristics and data behaviours.
  18. The node roles that can currently define data tiers are:
  19. * <<data-content-node, data_content>>
  20. * <<data-hot-node, data_hot>>
  21. * <<data-warm-node, data_warm>>
  22. * <<data-cold-node, data_cold>>
  23. The more generic <<data-node, data role>> is not a data tier role, but
  24. it is the default node role if no roles are configured. If a node has the
  25. <<data-node, data>> role we treat the node as if it has all of the tier
  26. roles assigned.
  27. [[content-tier]]
  28. ==== Content tier
  29. The content tier is made of one or more nodes that have the <<data-content-node, data_content>>
  30. role. A content tier is designed to store and search user created content. Non-timeseries data
  31. doesn't necessarily follow the hot-warm-cold path. The hardware profiles are quite different to
  32. the <<hot-tier, hot tier>>. User created content prioritises high CPU to support complex
  33. queries and aggregations in a timely manner, as opposed to the <<hot-tier, hot tier>> which
  34. prioritises high IO.
  35. The content data has very long data retention characteristics and from a resiliency perspective
  36. the indices in this tier should be configured to use one or more replicas.
  37. NOTE: new indices that are not part of <<data-streams, data streams>> will be automatically allocated to the
  38. <<content-tier>>
  39. [[hot-tier]]
  40. ==== Hot tier
  41. The hot tier is made of one or more nodes that have the <<data-hot-node, data_hot>> role.
  42. It is the {es} entry point for timeseries data. This tier needs to be fast both for reads
  43. and writes, requiring more hardware resources such as SSD drives. The hot tier is usually
  44. hosting the data from recent days. From a resiliency perspective the indices in this
  45. tier should be configured to use one or more replicas.
  46. NOTE: new indices that are part of a <<data-streams, data stream>> will be automatically allocated to the
  47. <<hot-tier>>
  48. [[warm-tier]]
  49. ==== Warm tier
  50. The warm tier is made of one or more nodes that have the <<data-warm-node, data_warm>> role.
  51. This tier is where data goes once it is not queried as frequently as in the <<hot-tier, hot tier>>.
  52. It is a medium-fast tier that still allows data updates. The warm tier is usually
  53. hosting the data from recent weeks. From a resiliency perspective the indices in this
  54. tier should be configured to use one or more replicas.
  55. [[cold-tier]]
  56. ==== Cold tier
  57. The cold tier is made of one or more nodes that have the <<data-cold-node, data_cold>> role.
  58. Once the data in the <<warm-tier, warm tier>> is not updated anymore it can transition to the
  59. cold tier. The cold tier is still a responsive query tier but as the data transitions into this
  60. tier it can be compressed, shrunken, or configured to have zero replicas and be backed by
  61. a <<ilm-searchable-snapshot, snapshot>>. The cold tier is usually hosting the data from recent
  62. months or years.
  63. [discrete]
  64. [[data-tier-allocation]]
  65. === Data tier index allocation
  66. When an index is created {es} will automatically allocate the index to the <<content-tier, Content tier>>
  67. if the index is not part of a <<data-streams, data stream>> or to the <<hot-tier, Hot tier>> if the index
  68. is part of a <<data-streams, data stream>>.
  69. {es} will configure the <<tier-preference-allocation-filter, `index.routing.allocation.include._tier_preference`>>
  70. to `data_content` or `data_hot` respectively.
  71. These heuristics can be overridden by specifying any <<shard-allocation-filtering, shard allocation filtering>>
  72. settings in the create index request or index template that matches the new index.
  73. Specifying any configuration, including `null`, for `index.routing.allocation.include._tier_preference` will
  74. also opt out of the automatic new index allocation to tiers.
  75. [discrete]
  76. [[data-tier-migration]]
  77. === Data tier index migration
  78. <<index-lifecycle-management, Index Lifecycle Management>> automates the transition of managed
  79. indices through the available data tiers using the `migrate` action which is injected
  80. in every phase, unless it's manually specified in the phase or an
  81. <<ilm-allocate-action, allocate action>> modifying the allocation rules is manually configured.