index-rollover.asciidoc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [[index-rollover]]
  2. === Rollover
  3. When indexing time-series data like logs or metrics, you can't write to a single index indefinitely.
  4. To meet your indexing and search performance requirements and manage resource usage,
  5. you write to an index until some threshold is met and
  6. then create a new index and start writing to it instead.
  7. Using rolling indices enables you to:
  8. * Optimize the active index for high ingest rates on high-performance _hot_ nodes.
  9. * Optimize for search performance on _warm_ nodes.
  10. * Shift older, less frequently accessed data to less expensive _cold_ nodes,
  11. * Delete data according to your retention policies by removing entire indices.
  12. Rollover relies on three things:
  13. * An _index template_ that specifies the settings for each new index in the series.
  14. You optimize this configuration for ingestion, typically using as many shards as you have hot nodes.
  15. * An _index alias_ that references the entire set of indices.
  16. * A single index designated as the _write index_.
  17. This is the active index that handles all write requests.
  18. On each rollover, the new index becomes the write index.
  19. [discrete]
  20. [role="xpack"]
  21. [testenv="basic"]
  22. [[ilm-automatic-rollover]]
  23. === Automatic rollover
  24. {ilm-init} enables you to automatically roll over to a new index based
  25. on the index size, document count, or age. When a rollover is triggered, a new
  26. index is created, the write alias is updated to point to the new index, and all
  27. subsequent updates are written to the new index.
  28. TIP: Rolling over to a new index based on size, document count, or age is preferable
  29. to time-based rollovers. Rolling over at an arbitrary time often results in
  30. many small indices, which can have a negative impact on performance and
  31. resource usage.