InfluxDB
A time-series database: measurements, tags, and time-structured merge storage.
InfluxDB is purpose-built for timestamped data. Points are measurements with tag sets (indexed metadata), fields (values), and a timestamp. Storage follows an LSM shape adapted for time: writes hit a WAL and an in-memory cache, flush into immutable, time-partitioned TSM files, and compaction folds them while retention policies drop expired shards.
Schema built for time
Tags are indexed metadata (host, region) that identify a series; fields are the values. cardinality = tags² combinations — the number that decides whether the index stays fast.
TSM files
Time-Structured Merge files store compressed, time-ordered columns per shard. Immutable after write, merged by compaction, dropped whole by retention — the file IS the time range.
Retention and downsampling
Retention policies evict whole shards when data ages out — dropping a file beats deleting rows. Continuous queries or tasks downsample raw points into summary measurements.
The data model is the index strategy
Every point is (measurement, tag set, field set, timestamp). Tags are indexed: the series key measurement,tag-set identifies a distinct time series, and the index answers "which series exist" without touching field data. Fields are stored column-compressed per series inside TSM blocks.
That split is the schema decision that matters: a tag with unbounded values (e.g. user_id) explodes series cardinality, while a field stays compressed and unindexed. Time-series schemas are designed around which columns you filter by and which you aggregate.
weather,location=us-midwest,season=summer temperature=82,humidity=71 1689000000000000000
TSM: LSM adapted for time
Writes append to a WAL and an in-memory cache; when the cache fills, the points compress into immutable TSM files inside a time-partitioned shard. Compaction merges files and re-compresses. Queries touch only the shards whose time ranges intersect the query, and only the blocks for the requested fields.
Dropping expired data is a file operation, not a row delete — retention policies delete whole shards. The pattern is LSM with time as the natural partition key.
Diagrams
static storyboard — WebGPU animates when available
A live WebGPU particle field tinted to this exhibit. Plays only with WebGPU and no reduced-motion preference; a static storyboard renders for everyone else.
[caption] LSM shape with time as the partition key.
Points append to the WAL and cache, flush into immutable time-partitioned TSM files, and compact in the background while retention drops aged-out shards.
Raw points at one-minute resolution and the five-minute mean the downsampling task writes — same shape, less storage, query-friendly summaries.
[caption] Illustrative shapes for the downsampling pattern — not measured data. Retention keeps raw points briefly, summaries forever.
Raw points at one-minute resolution and the five-minute mean the downsampling task writes — same shape, less storage, query-friendly summaries.