jargon

Comparison

Retention policyvsTime to live

Retention policy

raw events older than thirteen months are deleted automatically, and nobody has to remember to do it.

A rule for how long each class of data is kept and what happens then. It is simultaneously a cost control, a legal obligation and a risk reduction, since data you no longer hold cannot leak. It is nearly always easier to implement at the partition level than by row, which is another reason partitioning by time is worth doing before you need it.

Full entry →

Time to live

you let the cached value expire after a fixed number of seconds instead of trying to work out exactly when it stopped being true.

An expiry stamped on a cache entry, after which it is treated as absent. TTL trades correctness for simplicity: you accept being wrong for up to the TTL in exchange for never having to reason about invalidation. Uniform TTLs on a batch of keys written together will expire together, which is one of the common ways to build yourself a stampede.

Full entry →

Related comparisons