Have you ever monitored CPU usage graphs on your servers? Need to store streaming data from IoT sensors? Want to track real-time stock price movements? When dealing with time-stamped data, there’s one database you should know: InfluxDB.
Today, we’ll explore InfluxDB, the world’s most popular open-source time series database, covering everything from basic concepts to installation and practical implementation.

1. What Makes InfluxDB Special?
InfluxDB is an open-source time series database developed by InfluxData, optimized for high-speed storage and retrieval of time series data in operational monitoring, application metrics, IoT sensor data, and real-time analytics.
While traditional relational databases like MySQL and PostgreSQL excel at general-purpose data management, they struggle with time-centric data. InfluxDB, however, was built from the ground up with time as the core organizing principle.
Understanding Time Series Databases (TSDB)
Time series databases are specialized for storing and processing time series data, providing pre-built structures and functions that would need to be repeatedly created in relational databases, making time series data handling much more efficient.
Simply put, it’s a specialist for data where “when did this happen?” is the most critical question. Think CPU usage, temperature readings, stock prices, website traffic—any data that accumulates over time.
2. Why Choose InfluxDB?
As of January 2019, InfluxDB ranked #1 in the DB-Engines time series database rankings with the highest score. As of 2025, it maintains its dominant position in the time series database space.
Why do so many developers choose InfluxDB?
Massive Adoption
InfluxDB has over 1 billion Docker downloads, Telegraf has surpassed 5 billion downloads, and it ranks #1 in the DB-Engines time series database category.
Simple Installation and Use
It’s easy to install, supports SQL-like query syntax, and provides compatibility with the Graphite monitoring protocol. If you’ve worked with databases before, you’ll feel right at home.
HTTP API for Easy Integration
The REST-based interface makes it convenient for web environments, allowing web servers to send queries or enabling numerous sensors to efficiently write time series data.
3. The InfluxDB 3 Era – Completely Reimagined Architecture
In April 2025, InfluxDB 3 Core and InfluxDB 3 Enterprise were officially released. After more than four years of development, it was completely rewritten in Rust and built on Apache Arrow, DataFusion, Parquet, and Flight, delivering significant performance improvements and architectural flexibility.
Revolutionary Changes in InfluxDB 3
The biggest changes in InfluxDB 3 are unlimited cardinality support, native SQL support, and separation of compute and storage. Previous versions suffered performance issues with high cardinality (number of unique values), but InfluxDB 3 eliminates this constraint.
InfluxDB 3 Core (Open Source)
- Free under MIT / Apache 2 license
- Optimized for recent data queries
- Suitable for single-node deployments
- One-line installation with native SQL and InfluxQL support out of the box
InfluxDB 3 Enterprise (Commercial)
- High availability with automatic failover
- Optimized for long-range queries
- Read replicas
- Multi-region durability and enhanced security
Built-in Python Processing Engine
InfluxDB 3 includes a built-in Python processing engine that enables data transformation, enrichment, and alerting directly within the database, elevating InfluxDB from passive storage to an active intelligence engine for real-time data.
4. Real-World Use Cases
Understanding InfluxDB’s applications helps illustrate its power.
IoT Sensor Data Collection
Projects use Raspberry Pi Pico with DHT11 sensors to collect temperature and humidity data, store it in InfluxDB, and visualize it with Grafana. InfluxDB powers real-time sensor data processing in smart homes and smart factories.
Server and Application Monitoring
Cloud platforms use InfluxDB with Grafana to build system and infrastructure monitoring services. The InfluxDB-Grafana combination is widely used for real-time monitoring of server CPU, memory, and disk usage.
E-commerce Performance Analytics
E-commerce platforms use InfluxDB to collect search API metrics, product counts, and indexing data, then use Flux queries to create daily, weekly, monthly, and yearly statistical graphs visualized in Grafana.
Industrial IoT Leader
InfluxDB is the world’s most recognized time series database and the flagship of open-source time series databases.
5. Getting Started: Installing InfluxDB 3
Let’s install and use the latest version, InfluxDB 3 Core.
Quick Install on Linux/macOS
To install InfluxDB 3 Core on Linux or macOS, download and run the quick installer script:
curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh
This script always installs the latest version.
Docker Installation (Recommended)
InfluxDB 3 Core provides Docker images supporting both x86_64 (AMD64) and ARM64 architectures:
docker pull influxdb:3-core
docker run -d -p 8086:8086 \
-v influxdb3-data:/var/lib/influxdb3 \
--name influxdb3 \
influxdb:3-core
Important: Starting February 3, 2026, the Docker latest tag will point to InfluxDB 3 Core. Use specific version tags to avoid unexpected upgrades.
Verify Installation
influxdb3 --version
If the command isn’t found, reload your shell configuration:
source ~/.zshrc # or source ~/.bashrc
Official installation documentation: https://docs.influxdata.com/influxdb3/core/install/
6. InfluxDB 2 Remains Actively Supported
InfluxDB 2 has no end-of-life plans, and InfluxDB 3 Core is not a replacement for InfluxDB OSS v1 and v2. Existing projects can continue using v2, while new projects should consider v3.
Installing InfluxDB 2 (For Existing Projects)
macOS installation with Homebrew:
brew update
brew install influxdb@2
brew services start influxdb@2
Ubuntu/Debian installation:
wget -qO- https://repos.influxdata.com/influxdata-archive_compat.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian stable main" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install influxdb2
sudo systemctl start influxdb
InfluxDB 2’s default port is 8086. After installation, access the InfluxDB UI at http://localhost:8086.
Official InfluxDB 2 installation docs: https://docs.influxdata.com/influxdb/v2/install/
7. Writing Your First Data (InfluxDB 2)
Now let’s store some data.
Initial Setup
- Navigate to
http://localhost:8086 - Click Get Started
- Enter the following information:
- Username: Your preferred username
- Password: A secure password
- Organization Name: Your company or personal name
- Bucket Name: Name for your first data store
- Important! After clicking Continue, save the generated API Token securely.
Writing Data via CLI
You can write data using the influx command from your terminal:
influx write \
--bucket my-bucket \
--org my-org \
--precision s \
"temperature,location=room1 value=23.5 1641024000"
Writing Data via HTTP API
The HTTP API allows easy data writing from any programming language:
curl --request POST \
"http://localhost:8086/api/v2/write?org=my-org&bucket=my-bucket&precision=s" \
--header "Authorization: Token YOUR_API_TOKEN" \
--header "Content-Type: text/plain; charset=utf-8" \
--data-binary "
temperature,location=room1 value=23.5 1641024000
temperature,location=room2 value=22.3 1641024010
"
Understanding the Data Model
InfluxDB uses a unique data model:
| InfluxDB Term | RDBMS Equivalent | Description |
|---|---|---|
| Bucket | Database | Container for data storage |
| Measurement | Table | Data type (e.g., temperature) |
| Tag | Indexed Column | Indexed metadata (e.g., location=room1) |
| Field | Column | Actual measured values (e.g., value=23.5) |
| Timestamp | Timestamp | Time information (auto-generated) |
8. Querying Your Data
Query stored data using the Flux query language.
Basic Query Example
from(bucket: "my-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "temperature")
|> filter(fn: (r) => r._field == "value")
This query:
- Fetches data from
my-bucket - Filters to the last hour
- Selects only the
temperaturemeasurement - Selects only the
valuefield
Flux query performance varies with execution order, so efficient query construction is important.
Querying in the InfluxDB UI
Access http://localhost:8086 and log in to manage data or execute queries through the provided UI:
- Select Data Explorer from the left menu
- Choose your bucket from the top
- Set filter conditions or write Flux queries directly
- Click Submit to view results
9. Visualizing with Grafana
Grafana excels at time series metric data collection and is widely used for visualizing server resource metrics and log data.
Installing Grafana
Quick installation with Docker:
docker run -d -p 3000:3000 --name grafana grafana/grafana
Connecting InfluxDB as a Data Source
- Access Grafana at
http://localhost:3000(default credentials: admin/admin) - Navigate to Configuration → Data Sources
- Click Add data source
- Select InfluxDB
- Configure:
- Query Language: Flux
- URL:
http://localhost:8086 - Organization: Your organization name
- Token: Your API Token
- Default Bucket: Your bucket name
- Click Save & Test
A successful connection displays “datasource is working”!
Creating Dashboards
- Select + → Dashboard from the left menu
- Click Add new panel
- Write queries or use the Visual Query Builder
- Choose visualization type (Graph, Gauge, Table, etc.)
- Click Apply to save the panel
Grafana’s extensive visualization options make real-time monitoring dashboards easy to build.
Official Grafana docs: https://grafana.com/docs/grafana/latest/
10. The TICK Stack – InfluxDB’s Powerful Ecosystem
The TICK stack—Telegraf, InfluxDB, Chronograf, and Kapacitor—forms a powerful and popular platform for time series data operations.
Telegraf – Data Collection Agent
- Over 200 input plugins
- Automatic collection of system metrics (CPU, memory, disk)
- Support for diverse sources (MySQL, Redis, MQTT, etc.)
- Simple installation and configuration
InfluxDB – Data Storage
- Efficient storage of collected time series data
- Maximized storage efficiency through compression algorithms
Chronograf – Visualization Tool
A visualization engine for creating graphs, visualizing data, and performing ad-hoc exploration.
Kapacitor – Real-time Processing
A database co-processor that can perform actions based on data, providing its own scripting language and functions for custom logic or user-defined functions.
11. Essential Tips for Using InfluxDB
Leverage Its Strengths
InfluxDB can handle hundreds of thousands of writes per second, with data indexed immediately upon arrival and queryable within 100ms.
Understand Its Limitations
InfluxDB is designed for Insert and Select performance, so Update and Delete operations are minimally supported. It’s built on the premise that time series data, once written, doesn’t need modification.
This isn’t a weakness—it’s characteristic of time series databases. Sensor data and logs don’t require modification after recording.
Configure Retention Policies
InfluxDB will eventually fill disk space, requiring data retention or deletion policies.
Setting retention in InfluxDB 2:
# Configure in UI
# Data → Buckets → Create Bucket
# Set Retention Period: 30 days
Tag vs Field Guidelines
- Tags: Indexed for filtering (e.g., location, sensor_id)
- Fields: Store actual measurements (e.g., temperature, humidity)
Keep tag cardinality (unique value count) low, though InfluxDB 3 supports unlimited cardinality, greatly reducing this constraint.
12. Implementing in Production
Python Client
Using the InfluxDB 2 Python client:
from influxdb_client import InfluxDBClient, Point
from influxdb_client.client.write_api import SYNCHRONOUS
# Create client
client = InfluxDBClient(
url="http://localhost:8086",
token="YOUR_API_TOKEN",
org="my-org"
)
# Write data
write_api = client.write_api(write_options=SYNCHRONOUS)
point = Point("temperature") \
.tag("location", "room1") \
.field("value", 23.5)
write_api.write(bucket="my-bucket", record=point)
# Query data
query = '''
from(bucket: "my-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "temperature")
'''
result = client.query_api().query(query)
for table in result:
for record in table.records:
print(f"{record.get_time()}: {record.get_value()}")
Node.js Client
const {InfluxDB, Point} = require('@influxdata/influxdb-client')
const client = new InfluxDB({
url: 'http://localhost:8086',
token: 'YOUR_API_TOKEN'
})
const writeApi = client.getWriteApi('my-org', 'my-bucket')
const point = new Point('temperature')
.tag('location', 'room1')
.floatField('value', 23.5)
writeApi.writePoint(point)
await writeApi.close()
Official client libraries support Python, Go, Java, JavaScript, C#, PHP, Ruby, and more.
Client library docs: https://docs.influxdata.com/influxdb/v2/api-guide/client-libraries/
13. Performance Optimization
Batch Writes
Writing multiple data points together significantly improves performance:
points = []
for i in range(1000):
point = Point("sensor_data") \
.tag("sensor_id", f"sensor_{i%10}") \
.field("value", i * 0.1)
points.append(point)
write_api.write(bucket="my-bucket", record=points)
Downsampling for Historical Data
Downsampling processes historical data at regular intervals and stores it anew—for example, calculating 30-minute averages and saving them to a separate bucket.
Creating a task in InfluxDB 2:
option task = {name: "downsample-5m", every: 5m}
from(bucket: "raw-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "temperature")
|> aggregateWindow(every: 5m, fn: mean)
|> to(bucket: "downsampled-data")
Conclusion
InfluxDB has become an essential tool for modern applications dealing with time series data. It delivers powerful performance across all time-critical domains—IoT, monitoring, and real-time analytics.
Millions of developers build real-time systems with InfluxDB, the leading time series database.
With the 2025 release of InfluxDB 3, we now have a completely new architecture with innovative features like SQL support and unlimited cardinality. Consider the proven InfluxDB 2 for existing projects and the cutting-edge InfluxDB 3 for new initiatives.
While there’s a learning curve, once you’re comfortable with InfluxDB, you won’t want to manage time series data any other way. Installation and basic usage are simpler than you might expect—why not try it in your next project?
For more information, check these official resources:
- InfluxDB 3 Core docs: https://docs.influxdata.com/influxdb3/core/
- InfluxDB 2 docs: https://docs.influxdata.com/influxdb/v2/
- InfluxData official site: https://www.influxdata.com/