Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News RedisTimeSeries Module Adds Time Series Database Features to Redis

RedisTimeSeries Module Adds Time Series Database Features to Redis

This item in japanese


RedisTimeSeries, a Redis module, has been made generally available after a 6 month preview. The module aims to provide functions for time series data analysis stored in Redis. It has basic time series tools like aggregation functions and takes advantage of Redis' existing storage architecture. There are no benchmarks available yet against existing time series databases (TSDB) like OpenTSDB and InfluxDB.

Redis -- primarily a key value store -- has been used to store time series using its other data structures like Sorted Sets, Hash and Streams before this. These methods have limitations like not having a time series toolset, and it’s also unclear how TSDB features like labels could be implemented using them. RedisTimeSeries grew out of an internal need at Redis to store and analyze time series metrics from managed Redis clusters. The existing command line interface works with the module.

The module, which is loaded as a dynamic library, uses fixed size chunks of memory arranged as a linked list. Each chunk has "a predefined size of the samples" and is indexed by the same implementation used by Streams. It has basic time series functions like querying, aggregation, retention policies, downsampling and compaction. However, compaction in this context seems to be different from compaction in other time series databases like OpenTSDB. Labels in time series data add contextual information for that series. These are implemented as secondary indices here. There are some caveats about storing data with millisecond precision.

The initial integrations of the module are with Prometheus as a remote write adapter, where Prometheus can use RedisTimeSeries as a backend database. There is a datasource for Grafana and configuration for Telegraf as a metrics collector. While this module has been reported to perform better against existing Redis ways of storing time series, there are no benchmarks available yet against other time series databases.

The module is open source and is available on Github, although there are no plans to merge it with the core product. Future plans include integrations with more visualization tools and data stream providers.

Rate this Article