Your team already runs Redis and must keep fleet temperature readings: when is Redis's time series type enough, and when is a dedicated time-series database worth running?
answer
- size it in RAM first
- bucket width sets the bill
- rollups are decided in advance
- fixed aggregators, same-timestamp reducers
- one key, one hash slot
basics
~20 sThe type is enough when the raw window fits in RAM, rollups are known up front, and queries are ranges and bucket aggregates. A dedicated database earns its cost when history, query variety or series count outgrow that.
solid answer
~50 sI would size it first. A second-by-second device writes 86,400 samples a day at 16 bytes each uncompressed, and compression can cut that by about 90%, less on irregular values. The surprise is the rollup: a year of one-minute buckets holds 525,600 samples, about six times a day of raw. If that fits the memory budget on its own instance, the type is a good answer: fast reads, labels for fleet queries, and no new system to run. I would move when raw history must outlast what RAM can pay for, when questions go beyond fixed rollups, ranges and same-timestamp reducers, such as percentiles over ad-hoc windows, or when this must be the durable system of record. A common middle ground keeps recent data and fixed rollups in Redis and puts full history elsewhere. I would write down the triggers and prove the numbers with a pilot.
go deeper
Remember that all samples sit in memory, so retention and series count translate directly into the RAM you pay for, and that the type is built around timestamps with double values.
Do the arithmetic aloud: samples per day, 16 bytes each uncompressed, perhaps 90% off with compression, and multiply by rollups, statistics and devices before giving an opinion.
Identify operational conflicts: main-thread TS.MRANGE, allkeys eviction of series keys, per-key hash slots in Cluster, and durability limited to the instance's RDB and AOF settings.
Frame it as reversibility. Own a gateway so a second store can be added, write triggers for moving, and refuse to let a convenient default quietly become the system of record.
## The decision a lead owns The question is not whether Redis can store temperature readings, because it can. The question is whether **this workload stays inside what the type is good at for the life of the product**, and what it costs to find out later that it does not. Since Redis 8.0 the type ships with Redis Open Source, so there is no new system to adopt, which is exactly why teams drift into it without deciding. ## Size it before arguing Everything lives in memory, so the first check is arithmetic. A sample is 16 bytes uncompressed, a timestamp and a double. The docs say compression can cut memory by about 90%, with highly irregular timestamps or values as the exception, so treat that as a hopeful planning figure, not a guarantee. Take 10,000 devices reporting once a second, with one series of each kind per device: | Series | Samples per device | Uncompressed, fleet | At 90% reduction, fleet | |---|---|---|---| | Raw, 1 per second, 1 day | 86,400 | About 14 GB | About 1.4 GB | | 1-minute rollup, 1 year | 525,600 | About 84 GB | About 8.4 GB | | 1-hour rollup, 1 year | 8,760 | About 1.4 GB | About 140 MB | Three lessons come out of that table: - **Downsampling is not automatically cheap.** A year of one-minute buckets holds about six times the samples of a day of raw, and averaged floats may compress worse than a steady sensor. - **Bucket width sets the bill.** Moving from one-minute to one-hour rollups divides that row by sixty. - **Statistics multiply it.** Each rule holds one aggregator, so min, avg and max mean three series. Add per-series overhead: the docs' `TS.INFO` example shows `memoryUsage` of 4504 bytes for an empty series at the default chunk size. Then multiply for replicas. Measure on real data, since `TS.INFO` reports actual `memoryUsage`. ## Where the type fits well - Recent data for live dashboards, with `TS.GET` and `TS.MGET` for the newest values and `TS.RANGE` for short windows. - A retention horizon you can state and afford in RAM. - Rollups that can be named in advance, then computed incrementally by `TS.CREATERULE`. - Fleet views built from labels with `TS.MRANGE`, `GROUPBY` and `REDUCE`. - A team that already operates Redis and would rather not run another system. ## Where it stops These limits are in the type itself, whatever your scale: - **One double per timestamp per key.** Each metric on each device is its own key. - **Fixed statistics.** The aggregator list has `avg`, `min`, `max`, `sum`, `range`, `count`, `first`, `last`, `twa` and standard deviation and variance. It has no percentile. - **Reducers need identical timestamps.** There are no joins between series beyond `GROUPBY` on a label. - **Rollups must be chosen early.** No backfill exists, and once raw ages out, a statistic you did not compute is gone. - **One key lives in one hash slot.** Redis Cluster spreads series across shards, never one series across shards, and `TS.MRANGE` fans out to all shards. ## Running it beside other Redis workloads On a single node, `TS.MRANGE` runs as an ordinary command on the main thread, so a wide query delays everything else there. Under an `allkeys-*` eviction policy, a series key can be evicted like any other key. Both are reasons to give time series its own instance rather than sharing a cache. Durability is whatever that instance's RDB and AOF configuration provides, so decide whether these readings can be lost, and do not make Redis the only copy of data you must keep without saying so out loud. The licence is also part of the decision: since 8.0 Redis Open Source is offered under a choice of RSALv2, SSPLv1 or AGPLv3, while 7.2 and earlier remain BSD. ## When something else is worth running A **dedicated time-series database** is a second system with its own operations and its own on-call burden, so it has to earn that. Test each candidate against the gaps above rather than against a feature list. It is worth running when one of these becomes true: 1. Raw resolution must stay queryable for longer than the memory budget allows. 2. People ask questions nobody can list in advance, across windows and statistics no rollup holds. 3. The readings are a record the business must not lose, and need a durability story beyond this instance. 4. The series count keeps climbing with new metrics per device. The common middle ground keeps recent data and fixed rollups in Redis, for the latency, and ships the full stream to another store for history. A gateway that owns ingestion makes that split cheap to add later, which is the real hedge: the decision stays reversible if writes do not go straight from devices to Redis. ## How to decide 1. Write down retention, resolution and the dashboard's actual queries. 2. Run a pilot on real readings and record `TS.INFO` `memoryUsage`. 3. Set written triggers for moving, tied to the list above, and review them at each capacity review.
- Should Redis time series share an instance with the application's cache?I would keep them apart. A cache often runs an `allkeys-*` eviction policy, which can remove a series key as readily as a cached value, and wide `TS.MRANGE` queries on a single node hold up cache traffic on the main thread. Separate instances also give each its own persistence settings and memory budget.
- What would you measure in a pilot before committing to the Redis time series type?Real bytes per sample, from `TS.INFO` `memoryUsage` over `totalSamples`, on actual readings, because the docs' 90% is what compression can reach, not a promise. Then the real out-of-order share, write latency with all rollup rules on, and `TS.MRANGE` latency at fleet width. Finally list the dashboard's queries and check each one against what aggregators, rollups and reducers can express.
- Compression makes memory a non-issue at any retention horizon.
- Downsampling always makes a year cheaper to keep than a day of raw.
- Redis Cluster spreads one big time series key across several shards.
- A rollup can later answer any statistic, since the data is summarised anyway.
- A label query across the fleet costs about the same as reading one key.
Assumes Redis 8.10; the time series type has shipped in Redis Open Source since 8.0, with RSALv2, SSPLv1 or AGPLv3 licensing, while 7.2 and earlier remain BSD.