InfluxDB is an open-source time series database built to ingest, store and query timestamped measurements such as server metrics, application events and industrial sensor readings at high write rates. Among database systems, it belongs to the specialized family that treats time as the primary axis of every record, so storage layout, indexing and query functions are all organized around time ranges rather than arbitrary rows.
Developed by InfluxData, InfluxDB is widely used for infrastructure monitoring, IoT telemetry and real-time analytics. Its design favors append-heavy workloads, cheap downsampling and automatic expiry of old data, which makes it a different tool from general-purpose relational engines such as PostgreSQL or MySQL.
How InfluxDB organizes time series data
InfluxDB stores every data point as a combination of a measurement, a set of tags, a set of fields and a timestamp. The measurement plays a role similar to a table name, tags hold descriptive metadata such as host or region, and fields hold the actual numeric or string values being recorded.
The distinction between tags and fields is the most important modeling decision. In versions 1.x and 2.x, tags are indexed and suited to filtering and grouping, while fields are not indexed and are meant for values that change with every point. A unique combination of measurement and tag values defines a series, and the number of distinct series is called series cardinality.
Data arrives most often in line protocol, a compact text format. A single line such as cpu,host=web01,region=us-east usage_idle=92.5 1700000000000000000 carries the measurement, tags, field and a nanosecond-precision timestamp. Clients batch thousands of such lines per HTTP request to reach high ingest rates.
The following table summarizes the core elements of the InfluxDB data model and their purpose.
| Element | Role | Typical example |
|---|---|---|
| Measurement | Groups related points, similar to a table | cpu, temperature, http_requests |
| Tag | Indexed metadata used for filtering | host=web01, region=us-east |
| Field | Recorded value, not indexed in 1.x and 2.x | usage_idle=92.5, status=200 |
| Timestamp | Time of the observation, up to nanoseconds | 1700000000000000000 |
| Bucket | Named storage container with a retention period | metrics_30d, sensors_raw |
Storage engines across InfluxDB versions
InfluxDB has gone through three major architectures, and the version in use determines performance characteristics, query languages and operational limits. Versions 1.x and 2.x, written in Go, use the Time-Structured Merge Tree (TSM) engine, a design related to log-structured merge trees that writes incoming points to a write-ahead log and an in-memory cache before compacting them into compressed, read-optimized TSM files.
TSM applies type-specific compression, such as delta and delta-of-delta encoding for timestamps and Gorilla-style XOR encoding for floating-point values, which often reduces regular metric data to a few bytes per point. The separate Time Series Index (TSI) maps tag values to series on disk, yet very high cardinality still increases memory use and slows queries.
InfluxDB 3 is a rewrite in Rust built on Apache Arrow, Apache DataFusion and Apache Parquet. It stores data in columnar Parquet files, often on object storage, and largely removes the series cardinality ceiling that constrained earlier versions. The table below compares the generations.
| Version | Storage engine | Query languages | Cardinality behavior |
|---|---|---|---|
| InfluxDB 1.x | TSM with TSI index | InfluxQL | Degrades at millions of series |
| InfluxDB 2.x | TSM with TSI index | Flux and InfluxQL | Degrades at millions of series |
| InfluxDB 3 | Columnar Parquet with Arrow in memory | SQL and InfluxQL | Designed for very high cardinality |
Querying and processing data in InfluxDB
InfluxDB queries center on time-bounded aggregation: selecting a time range, filtering by tags and summarizing values into windows. InfluxQL offers a SQL-like syntax with functions such as MEAN(), PERCENTILE() and GROUP BY time(5m), while Flux, introduced in 2.x, is a functional pipeline language for joins, transformations and alerting logic.
Flux proved powerful but difficult to learn, and InfluxDB 3 does not support it. Instead, version 3 adopts standard SQL through DataFusion, keeping InfluxQL for compatibility. Teams planning migrations should therefore treat Flux scripts as technical debt that will need rewriting.
Beyond queries, InfluxDB provides retention periods that delete data older than a configured age and scheduled tasks or continuous queries that downsample raw points into coarser summaries. A common pattern keeps 10-second raw data for 7 to 30 days and hourly aggregates for a year or longer.
InfluxDB compared with related database systems
InfluxDB competes with purpose-built and general-purpose engines that can also hold time series. The right choice depends on whether the workload needs relational joins, ad hoc analytics over billions of rows or a lightweight metrics pipeline. The table below contrasts InfluxDB with neighbors in the same field.
| System | Core approach | Strength | Main trade-off |
|---|---|---|---|
| InfluxDB | Dedicated time series engine | Simple ingest and retention for metrics | Version changes affect query languages |
| TimescaleDB | PostgreSQL extension with hypertables | Full SQL and relational joins | Inherits PostgreSQL tuning overhead |
| ClickHouse | Columnar analytical database | Very fast large-scale aggregation | Less built-in retention tooling for metrics |
| Prometheus | Pull-based monitoring system | Native alerting for Kubernetes metrics | Limited long-term storage on its own |
| Apache Cassandra | Wide-column distributed store | Massive multi-region write scale | No native time series functions |
In practice, InfluxDB fits teams that want a self-contained metrics store with a collector agent, Telegraf, offering hundreds of input plugins. TimescaleDB suits teams that must join time series with business tables, and ClickHouse suits broad analytical workloads where time is only one dimension.
Designing and operating InfluxDB well
Most InfluxDB problems trace back to schema design rather than hardware. Placing unbounded values such as user IDs, request IDs or full URLs into tags creates runaway series cardinality in 1.x and 2.x, which inflates memory, slows startup and can stall writes. Such values belong in fields or outside the database entirely.
The following table lists frequent mistakes, their symptoms and recommended corrections.
| Mistake | Symptom | Recommended fix |
|---|---|---|
| Unique IDs stored as tags | Memory growth and slow queries | Store IDs as fields or drop them |
| Single-point writes | Low throughput and high CPU | Batch 5,000 to 10,000 lines per request |
| No retention period | Disk usage grows without limit | Set bucket retention and downsample |
| Mixed field types | Write errors for conflicting types | Keep one data type per field |
| Excessive timestamp precision | Larger storage than necessary | Write at second or millisecond precision |
Operators should also account for licensing differences. Open-source editions run on a single node, while clustering, high availability and advanced compaction are reserved for commercial or managed offerings. Capacity planning should therefore include a decision on whether a single node meets availability targets.
In plain words
InfluxDB is a database made for numbers that arrive with a time attached. Think of a weather station that writes down the temperature every ten seconds, all day, every day. A normal database can store that, but InfluxDB is built specifically for it.
It writes new readings very quickly, packs them tightly on disk and can answer questions such as what was the average over the last hour almost instantly. It can also throw away old details automatically, keeping only daily summaries, much like keeping monthly bank statements instead of every receipt. The key idea is simple: when time is the main question, a time series database answers it best.
A real-world example
A regional water utility monitors 1,200 pumps and pressure sensors across its network. Each device reports pressure, flow rate and motor temperature every 15 seconds. Telegraf agents at pumping stations send the readings to InfluxDB in batches, tagged with station, pump model and district.
Engineers keep raw data for 30 days and use a scheduled task to store five-minute averages for five years. Dashboards show live pressure by district, and an alert fires when motor temperature rises more than 15 degrees Celsius above its weekly baseline.
Within the first quarter, the team detected two failing bearings days before breakdown. The result was planned maintenance instead of emergency repairs and fewer service interruptions for customers.