Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

always useful

You must be logged in to vote

Replies: 8 comments · 11 replies

Comment options

What exactly do people want with timeseries? I haven't heard all that much about it.

You must be logged in to vote
4 replies
@robswc
Comment options

I currently use Redis Timeseries for pooling and accessing data that is streamed from an external source.

@madolson
Comment options

@robswc Would you be willing to say more. What type of aggregation are you doing? What is the size of the data? When do you truncate the data?

@robswc
Comment options

Sure! (sorry for the delay). Basically just signal processing. I don't use any aggregation or truncation, just setting an expiration. Something like weather data, recording the temperature every second, then pulling the last X and processing in an application.

@aniketawati
Comment options

We use it for real time calculation of customer attributes based on user behaviour. Like total purchase in last x hours/days.
We use different aggregation types, and also down sampling feature. This is currently used at a fairly large scale.

Comment options

Would like to use redistimeseries to support both time-series range extraction and aggregation for a real-time feature store for ML prediction purpose.

You must be logged in to vote
1 reply
@bgalvao
Comment options

+1!

Comment options

I'm working on a rust timeseries library that I had hoped to integrate into redis. If there is interest, I can devote some effort, but it would definitely need some external contributors.

You must be logged in to vote
0 replies
Comment options

We're heavily using (plain) Redis to implement realtime rolling windows like "counting events in the last 30 days".
It works especially well with very sparse data on tens of millions time-series.

Something else that has been very useful is that incrementing the current time-series "bucket" returns the current count.
We've been using this to trigger other events.

You must be logged in to vote
2 replies
@bgalvao
Comment options

I'd love to be pointed to a reference on how I could do this as well, as I am facing the same problem!

@ccollie
Comment options

I'd love to be pointed to a reference on how I could do this as well, as I am facing the same problem!

What are your requirements beyond what's in redis-timeseries ? I have code implementing parts of this, but my focus is slightly different. If you'd like some pointers, I'd be glad to help.

Comment options

If anyone is willing to collaborate on specs for an MVP, I can devote some time to getting something started.
For a first cut, i'd suggest

TS.CREATE
TS.DEL
TS.ADD
TS.MADD
TS.MGET
TS.RANGE
TS.MRANGE

Aggregations and compactions would come later.

You must be logged in to vote
1 reply
@madolson
Comment options

You can review similar RFCs here: https://github.com/valkey-io/valkey-rfc. If you want to create a draft, people can update it later.

Comment options

First draft of the Valkey TimeSeries spec is posted here. Contributions and critiques welcome !

You must be logged in to vote
0 replies
Comment options

@ccollie is this intended to be API compatible with Redis's TimeSeries?

Edit: Reading comprehension is important 🤦‍♂️

the module is designed to be API-compatible with Redis Ltd.’s RedisTimeSeries.

You must be logged in to vote
1 reply
@ccollie
Comment options

Actually the aim is to implement a superset or the API

Comment options

@ccollie this is a great document. Threes things come to mind:

  1. Does all timeseries data need to be stored in memory. We are using Redis TS and keeping up to two years of 5 min samples plus 30 days of high frequency samples (>=1sec) and we are hitting 64GB. Obviously the older the data the least frequently accessed but still needed for analysis of events.
  2. I would be very interested in not only querying for time filters but for values (e.g. get me all the timestamps where the metric is less than X). This is quite useful in analyzing data. For example, all the times that weather temperature dropped below 0 or rose above 50 c.
  3. Leveraging something like ZRAM in linux as a means to store the less frequently used data in compressed form.
You must be logged in to vote
2 replies
@ccollie
Comment options

@m2b ,

  1. Does all timeseries data need to be stored in memory. ... Obviously the older the data the least frequently accessed but still needed for analysis of events.

Currently yes. I'm using the infra provided by valkey itself, which has no analog of Redis On Flash. The only alternative at the moment is better compression. A method which I'm toying with is using a columnar block type and encoding with pcodec , which according to docs should offer near the theoretical limit of compression. In addition, there's configurable decimal/significant digits per timeseries which may help in cases where full precision is not needed.

  1. I would be very interested in not only querying for time filters but for values (e.g. get me all the timestamps where the metric is less than X). This is quite useful in analyzing data. For example, all the times that weather temperature dropped below 0 or rose above 50

We support redis-style range queries which have value filters of the form FILTER_BY_VALUE min max

  1. Leveraging something like ZRAM in linux as a means to store the less frequently used data in compressed form.

A stretch goal is to have configurable tiered storage where less frequently accessed data uses blocks with higher levels of compression. Any OS level support will have to happen in Valkey itself.

@m2b
Comment options

@madolson where does this feature stand?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
10 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.