Redis timeseries data modeling

Viewed 465

I want to store network link information for past 1 day to do some analysis/calculation. I explored using redis timeseries module. My concern is I have a lot of tags/labels associated with one datapoint like the following:

For one link, tags are

  • source zone
  • destination zone
  • source device
  • destination device
  • source interface
  • destination interface
  • status

As per my understanding of the module, we can have unique label name-values for a single key, therefore I have to create different keys for all unique combination of label values, right?

Also, can we do clustering/sharding with timeseries module.

Please help with this.

1 Answers

Yes, you need a different key for each combination of label values.

At the moment, RedisTimeSeries cannot get data from multiple series that reside on different shards. This limitation applies to the TS.MGET and TS.MRANGE commands which retrieve data from several series in one call.

This limitation might be resolved soon. Meanwhile, you might be able to use keys hash tags to ensure series that will be queried together are on the same shard.

Related