Compaction rules for Time Series
In Redis Stack for Time Series, a compaction rule is a mechanism used to downsample data points and reduce data storage requirements over time. As time-series data grows and accumulates, it often becomes less important to store high-resolution data for older timestamps. Compaction rules help to maintain a balance between data storage and resolution requirements.
A compaction rule is a user-defined policy that dictates how the data points should be aggregated over a given time period (e.g., every minute, hour, or day) and retained in a downsampled series. The rule can specify the aggregation method, such as average, minimum, maximum, sum, or count, among the others described in the Aggregation framework section of this chapter.
For example, you can set up a compaction rule to downsample data every 5 minutes using the average aggregation function. This rule would create a new time series key where each data point represents the average value of...