What is a time-series database (TSDB)
A time-series database (TSDB) is a database optimized for storing and querying time series: sequences of values with timestamps. Monitoring is built on them — every metric is a series of "time → value" points.
How a TSDB differs from a regular database
- Data is almost always appended, not updated — which allows aggressive compression.
- Queries are almost always over a time range with aggregation: "average CPU across instances over the last hour".
- Old data gets cheaper: it is downsampled or dropped by retention.
Key concepts
- Series — a unique combination of a metric name and a label set, e.g.
http_requests_total{job="api", code="500"}. - Cardinality — the number of unique series. High cardinality (e.g. a user_id label) blows up memory and cost.
- Scrape / ingest — the interval at which new points arrive.
- Retention — how long raw points are kept.
Examples of TSDBs
Prometheus, VictoriaMetrics, Thanos, Mimir, InfluxDB, TimescaleDB. Unimoni uses a Prometheus-compatible store, so queries are written in PromQL.
sum(rate(http_requests_total[5m])) by (code)What matters in practice
Watch cardinality: do not put high-variance values (user_id, request_id, full URL) into labels. That is the main reason monitoring becomes "expensive" and slow.