I have a use case where I would like to save page views with a configurable retention period (let’s say 1 year). When queries are made, my purpose is to have low latency to get:
- page views per day for a given time period (e.g. week, month, year, or custom interval).
- page views per hour for the last 2 days.
After reading the Redis time series documentation, aggregation, compaction, and downsampling features look perfect for my use case. However, several questions that seem not addressed in the docs came to my mind:
TS.CREATERULEis used, can we use the same key as
destKey? or is it not recommended at all?
- If a compaction rule is created, and only the
destKeyis used for queries, meaning the
sourceKey(that is a timeseries) is only there to act as a buffer for compaction rules, can I use a
sourceKeywith a very short retention period (e.g. 1000ms) or this may prevent the compaction rule to handle all incoming adds if the module do some processing in the background? (I have no knowledge about redistimeseries internal).
- It seems possible to configure compaction when the redistimeseries module is loaded. What’s the difference with creating a compaction rule? Is it the same as creating compaction rules for each timeseries, with the same key as source and dest? or does compaction rules defined at module configuration create new keys (timeseries)? In that case, what is the name?
- Why is there no mean to define a compaction rule when a new timeseries is created with