{
  "id": "time-series-dashboard",
  "title": "Rolling sensor graph demo with Redis",
  "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/",
  "summary": "Build a rolling sensor graph demo with Redis time series data",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc"
  ],
  "last_updated": "2026-05-12T09:07:59-04:00",
  "children": [
    {
      "id": "redis-py",
      "summary": "Build a Redis-backed rolling sensor graph demo in Python with redis-py",
      "title": "Rolling sensor graph demo with Redis and redis-py",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/redis-py/"
    },
    {
      "id": "nodejs",
      "summary": "Build a Redis-backed rolling sensor graph demo in Node.js with node-redis",
      "title": "Rolling sensor graph demo with Redis and Node.js",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/nodejs/"
    },
    {
      "id": "java-jedis",
      "summary": "Build a Redis-backed rolling sensor graph demo in Java with Jedis",
      "title": "Rolling sensor graph demo with Java and Jedis",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/java-jedis/"
    },
    {
      "id": "go",
      "summary": "Build a Redis-backed rolling sensor graph demo in Go with go-redis",
      "title": "Rolling sensor graph demo with Go",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/go/"
    },
    {
      "id": "java-lettuce",
      "summary": "Build a Redis-backed rolling sensor graph demo in Java with Lettuce",
      "title": "Rolling sensor graph demo with Java and Lettuce",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/java-lettuce/"
    },
    {
      "id": "dotnet",
      "summary": "Build a Redis-backed rolling sensor graph demo in .NET with NRedisStack",
      "title": "Rolling sensor graph demo with Redis and .NET",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/dotnet/"
    },
    {
      "id": "rust",
      "summary": "Build a Redis-backed rolling sensor graph demo in Rust with redis-rs",
      "title": "Rolling sensor graph demo with Rust",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/rust/"
    },
    {
      "id": "php",
      "summary": "Build a Redis-backed rolling sensor graph demo in PHP with Predis",
      "title": "Rolling sensor graph demo with Redis and PHP",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/php/"
    },
    {
      "id": "ruby",
      "summary": "Build a Redis-backed rolling sensor graph demo in Ruby with redis-rb",
      "title": "Rolling sensor graph demo with Redis and Ruby",
      "url": "https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/ruby/"
    }
  ],
  "page_type": "content",
  "content_hash": "8f25fa07b08af591a42b7c7fb272f66ad69c0abe06ff799b8d64edda261e4aec",
  "sections": [
    {
      "id": "when-to-use-redis-time-series",
      "title": "When to use Redis time series",
      "role": "overview",
      "text": "Use Redis time series when you need to ingest, query, and retain high-velocity time-ordered numeric data — sensor readings, application metrics, telemetry, or prices — with sub-millisecond latency and automatic downsampling."
    },
    {
      "id": "why-the-problem-is-hard",
      "title": "Why the problem is hard",
      "role": "content",
      "text": "Time series workloads invert the typical read-heavy ratio: ingestion can reach hundreds of thousands of samples per second while reads are comparatively infrequent. Relational and document databases were not designed for this write volume and degrade under sustained load.\n\nWithout a purpose-built structure, teams approximate time series with sorted sets or custom Lua scripts, which works at small scale but lacks native aggregation, automatic downsampling, and per-sample retention — leading to fragile cleanup jobs and growing memory costs.\n\nDedicated time series databases like InfluxDB or TimescaleDB handle petabyte-scale cold archival and batch analytics, but add a separate system to provision, scale, and monitor when the requirement is real-time latency on an instance already in the stack. ([Redis Streams](https://redis.io/docs/latest/develop/data-types/streams) solve a different problem — ordered event logs with consumer-group delivery, not numeric aggregation over time windows.)"
    },
    {
      "id": "what-you-can-expect-from-a-redis-solution",
      "title": "What you can expect from a Redis solution",
      "role": "content",
      "text": "You can:\n\n-   Ingest device telemetry or application metrics at sustained high volume without a separate ingestion pipeline.\n-   Run aggregated range queries over arbitrary time windows for dashboards and alerting with single-digit millisecond response times.\n-   Define multi-tier downsampling (raw → 1-minute averages → 1-hour averages) that runs automatically as data arrives.\n-   Enforce retention policies that keep memory bounded without manual cleanup jobs.\n-   Query across thousands of series by label for root-cause analysis and operational monitoring.\n-   Power real-time operational dashboards without a separate metrics backend."
    },
    {
      "id": "how-redis-supports-the-solution",
      "title": "How Redis supports the solution",
      "role": "content",
      "text": "In practice, each metric is stored as a Redis [time series](https://redis.io/docs/latest/develop/data-types/timeseries) key with optional labels for the dimensions you want to query by (region, host, sensor type), and compaction rules to write downsampled summaries into companion keys as new samples arrive.\n\nRedis provides the following features that make it a good fit for time series workloads:\n\n-   The [time series](https://redis.io/docs/latest/develop/data-types/timeseries) data structure\n    (`TS.*` commands) is designed for sustained high-velocity ingestion with sub-millisecond\n    write latency.\n-   [`TS.RANGE`](https://redis.io/docs/latest/commands/ts.range) and\n    [`TS.MRANGE`](https://redis.io/docs/latest/commands/ts.mrange) return aggregated results\n    (`avg`, `sum`, `min`, `max`, `count`, `std.p`, `std.s`, `twa`, and others) over\n    arbitrary time windows in single-digit milliseconds, eliminating application-side\n    aggregation logic.\n-   [`TS.CREATERULE`](https://redis.io/docs/latest/commands/ts.createrule) defines source-to-destination\n    compaction with an aggregation function and bucket duration, so downsampling runs inside\n    Redis without an external pipeline.\n-   The `RETENTION` parameter on [`TS.CREATE`](https://redis.io/docs/latest/commands/ts.create) enforces\n    per-sample trimming relative to the newest sample, keeping memory bounded without\n    manual cleanup or key-level [`EXPIRE`](https://redis.io/docs/latest/commands/expire).\n-   Label-based secondary indexing enables cross-series queries\n    ([`TS.MRANGE`](https://redis.io/docs/latest/commands/ts.mrange) … `FILTER`) across thousands of keys\n    by any dimension — region, host, sensor type — in a single call."
    },
    {
      "id": "ecosystem",
      "title": "Ecosystem",
      "role": "content",
      "text": "The following tools and libraries integrate with Redis time series:\n\n-   **Grafana**:\n    [Redis Data Source plugin](https://grafana.com/grafana/plugins/redis-datasource/)\n    for real-time time series dashboards\n-   **Prometheus**: RedisTimeSeries remote read/write adapter\n-   **Telegraf**: output plugin for streaming collected metrics into Redis\n-   **Client libraries**: `TS.*` commands are available through standard Redis client\n    libraries including [redis-py](https://redis.readthedocs.io/),\n    [Jedis](https://github.com/redis/jedis),\n    [ioredis](https://github.com/redis/ioredis), and\n    [go-redis](https://github.com/redis/go-redis)\n-   **Infrastructure**: [Redis Cloud](https://redis.io/docs/latest/operate/rc) for managed deployments\n    with built-in time series support"
    },
    {
      "id": "code-examples-to-build-your-own-redis-time-series-dashboard",
      "title": "Code examples to build your own Redis time series dashboard",
      "role": "example",
      "text": "The following guides show how to build a rolling sensor graph demo backed by Redis time series.\nEach guide includes a runnable example with three simulated sensors, a rolling graph of raw\nreadings, bucketed min/max/average summaries on the same time axis, and a short retention\nwindow where old samples visibly expire:\n\n* [redis-py (Python)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/redis-py)\n* [node-redis (Node.js)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/nodejs)\n* [go-redis (Go)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/go)\n* [Jedis (Java)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/java-jedis)\n* [Lettuce (Java)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/java-lettuce)\n* [NRedisStack (C#)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/dotnet)\n* [Predis (PHP)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/php)\n* [redis-rb (Ruby)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/ruby)\n* [redis-rs (Rust)](https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/rust)"
    }
  ],
  "examples": []
}
