Retention Policies

Retention policies define how long data is persisted in an index, and which storage tiers are used to store that data.

A bucket refers to a 24-hour period of time in UTC, so the numbers configured in a retention policy map to days of retention.

The bucket for the current 24-hour is always hot and cannot be deleted or moved to the warm or cold tiers. This means that retention policies refer to the number of previous days to keep, not the total number of days to keep.

Simple

The Simple retention policy contains a single parameter buckets which defines the number of buckets that will be kept. All buckets will be kep on the hot storage tier.

A value of 0 means that all buckets are kept in hot storage indefinitely.

HotWarm

The HotWarm retention policy contains two parameters:

  • primary - The number of buckets to keep on the hot storage tier.
  • secondary - The number of buckets to keep on the warm storage tier.

A value of 0 for the primary parameter means that buckets are immediately moved to the warm storage tier when they are no longer the current bucket.

A value of 0 for the secondary parameter means that all buckets are kept indefinitely on the warm storage tier.

HotWarmCold

The HotWarmCold retention policy contains three parameters:

  • primary - The number of buckets to keep on the hot storage tier.
  • secondary - The number of buckets to keep on the warm storage tier.
  • tertiary - The number of buckets to keep on the cold storage tier.

A value of 0 for the primary parameter means that buckets are immediately moved to the warm storage tier when they are no longer the current bucket.

A value of 0 for the secondary parameter means that buckets are immediately moved to the cold storage tier.

A value of 0 for the tertiary parameter means that all buckets are kept indefinitely on the cold storage tier.