About

RollupDB is an aggregate database in one file. You feed it numeric readings, say which statistics have to survive, and it keeps those statistics in time buckets that get coarser as the data ages. Seconds become minutes, minutes become hours, hours become days. The raw events are never stored, so the file stays small however long the history gets.

It’s open source under the Apache License 2.0 and written in Go. There’s one binary with no server to run and no C compiler needed, plus a Go library and a small HTTP service on the same engine. You can ask it questions as JSON queries or in read-only SQL, and it rolls data up on a schedule while the service runs.

Why the Project Exists

Most telemetry ends up in one of two places. Either every event is kept, and the bill for storing and scanning years of it grows every month, or old data gets deleted and the history goes with it. Plenty of teams want something in between: last week by the minute, last year by the day, and the totals, extremes and percentiles still right.

Doing that by hand is where it goes wrong. An average of averages is not the average. A p99 of sixty minute-level p99s is not the hour’s p99. A rollup has to keep the pieces that combine correctly, counts and sums and variance state and a percentile sketch, and merge those. RollupDB does that bookkeeping so you don’t have to. How it works

Where It Fits

  • IoT and devices. Years of temperature, pressure or power readings, with extremes and percentiles, in a file small enough for a gateway.
  • API and service monitoring. Latency distributions and error counts per endpoint, kept long after the raw request logs are gone.
  • AI applications. Token use, cost and response time per model or feature, with history you can compare month to month.
  • Analytics you plan ahead. Any time series where you know the questions up front and don’t need every row.

Ground Rules

  • Measure, then say it. Every number on this site comes from the recorded test run in the code repository, and the commands to repeat it are there too.
  • Say what’s lost. Once raw events are gone you can’t ask a question you didn’t declare. A breakdown by a field you didn’t keep can’t be rebuilt. RollupDB tells you when a query asks for detail it no longer has, instead of guessing.
  • Exact where it can be. Count, sum, min, max and mean are exact. Percentiles come from a KLL sketch and are approximate, and every answer says so.
  • Acknowledge only what’s saved. A write is confirmed after it’s committed to disk. The tests kill the process mid-write to check it.

License

RollupDB is open source under the Apache License 2.0. The code, the tests and the recorded results are on GitHub. Ready-built binaries for Linux, macOS and Windows are on the download page.