Data does not live forever
A retention policy defines how long samples of a given resolution are kept before they are deleted. Without one, a metrics store grows without bound.
Tiering retention by resolution
Retention usually pairs with downsampling tiers:
- Raw high resolution data kept for days or weeks.
- Medium rollups kept for months.
- Coarse rollups kept for years.
This keeps recent debugging detail while letting long term trends survive cheaply.
How deletion happens
- Time series stores write data in time chunked blocks.
- A block past its retention is dropped whole, which is far cheaper than deleting individual points.
- Compaction merges and ages blocks toward coarser tiers.
Choosing a policy
Balance cost, compliance, and usefulness. Ask how far back anyone actually queries at full detail, and set raw retention just past that.
Key idea
Retention sets a lifetime per resolution and is enforced cheaply by dropping whole time blocks, with coarser tiers kept longer than fine ones.