docs/en/banyandb/ttl.md
Progressive TTL provides a capability to manage data retention with different TTL settings and Segment Creation Policies based on the time granularity of metrics.
BanyanDB employs a Time-To-Live (TTL) mechanism to automatically delete data older than the specified duration. When using BanyanDB as the storage backend, the recordDataTTL and metricsDataTTL configurations are deprecated. Instead, TTL settings should be configured directly within storage.banyandb.
For detailed information, please refer to the Storage BanyanDB documentation.
BanyanDB uses time-based rotation with two key settings per group (and per stage, if enabled):
Some groups support progressive stages:
When warm/cold stages are enabled, data flows hot → warm → cold as it ages, each stage having its own ttl, segmentInterval, and placement (nodeSelector).
Warm and Cold are disabled by default. The values listed for warm/cold apply if you enable those stages.
| Kind (group) | ttl | warm ttl | cold ttl |
|---|---|---|---|
| records | 3 | 7 | 30 |
| trace | 3 | 7 | 30 |
| zipkinTrace | 3 | 7 | 30 |
| recordsLog | 3 | 7 | 30 |
| recordsBrowserErrorLog | 3 | 7 | 30 |
| metricsMinute | 7 | 15 | 60 |
| metricsHour | 15 | 30 | 120 |
| metricsDay | 15 | 30 | 120 |
| metadata (index-mode) | 15 | — | — |
| property | — | — | — |
Notes:
For more details on configuring segmentIntervalDays and ttlDays, refer to the BanyanDB Rotation documentation.