InfluxDB
InfluxDB Overview
InfluxDB is an open source time series database. A time series database is a database specialized for accumulating and searching continuous data organized along a time axis, such as logs. It delivers higher performance than conventional databases for use cases such as storing large volumes of sensor data generated in IoT fields or various metrics and logs produced by server clusters in DevOps environments.
Like many other time series databases, earlier versions of InfluxDB used existing products as storage engines, such as LevelDB, RocksDB, and BoltDB.
However, in October 2015, InfluxData, the developer of InfluxDB, developed its original storage engine, Time-Structured Merge Tree (TSM), and InfluxDB has adopted TSM since then.
TSM is similar to the structure of the LSM Tree (Log-structured merge-tree) used in Apache HBase and similar systems, but it is a storage engine better adapted to accumulating time series data. It is optimized for the unique properties of time series data, and using this storage engine improved InfluxDB performance.
You can also check the differences between InfluxDB Cloud, InfluxDB Open Source, and InfluxDB Enterprise at the URL below.
https://www.influxdata.com/products/editions/
Key Features of InfluxDB
- High write throughput
- High read throughput
- Bulk deletion of large amounts of data, such as expired data
- Insert and read performance is prioritized over data updates and deletions.
Performance
InfluxData states on its own blog that, in performance comparisons with products other than time series databases such as Elasticsearch, Cassandra, and MongoDB, InfluxDB shows higher performance than any of those products for handling time series data in areas such as writes, reads, and data compression.
It is also said to show high performance in comparisons with OpenTSDB, another time series database.
Client Interfaces
Two interfaces are available for operating InfluxDB. One is the CLI (command-line interface), which is invoked from the shell with the influx command.
CLI access example, when time display follows RFC3339:
$ influx -precision rfc3339
Connected to http://localhost:8086 version 1.7.x
InfluxDB shell 1.7.x
>
The other interface is a REST API accessed over HTTP. By default, InfluxDB opens port 8086 and accepts HTTP requests. Query results can also be retrieved in JSON or CSV format.
REST API access example:
curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
Queries through both interfaces are performed using a SQL-like query language called InfluxQL. Because InfluxQL syntax is almost the same as SQL, it can be used if you already have knowledge of SQL.
The URL below lists the commands available in InfluxQL.
https://docs.influxdata.com/influxdb/v1.7/query_language/spec/#queries
As shown at the URL above, SELECT, INSERT, and DELETE exist, but there is no UPDATE command. In the InfluxDB documentation, CRUD is also described as CR-ud, with no support for ud. Delete exists, but it is usually used to delete large amounts of expired data at once rather than deleting a specific single record.
Functions such as GROUP BY and COUNT can also be used.
The list of available functions is available at the URL below.
https://docs.influxdata.com/influxdb/v1.7/query_language/functions#sidebar
Clustering (Enterprise Version Only)
Up to InfluxDB version 1.1, clustering functionality was provided as an alpha version. This was because the clustering feature was not mature enough for production environments.
Starting with 1.2, this clustering feature reached a stable level and became usable in production environments, but clustering became available only in the Enterprise (paid) edition.
InfluxData, the developer of InfluxDB, provides this option so that it can earn revenue from companies operating large-scale systems that require clustering, helping sustain its open source business. In version 1.2, only the standalone version can be used for free.
Similar Software to InfluxDB
Time series databases similar to InfluxDB include the following products.
- OpenTSDB
- Runs on Hadoop/HBase
- KairosDB
- OpenTSDB fork that uses Cassandra as its storage engine
- Prometheus
- A dedicated tool for collecting and monitoring system metrics
- DalmatinerDB
- Uses Riak as its storage engine
InfluxDB License
InfluxDB is open source software under the MIT license. Software under the MIT license can be redistributed and used commercially for free, making it a license with very loose restrictions compared with other open source licenses.
InfluxDB Operating Environment
InfluxDB is written in Go. It can be compiled on any OS where a Go compiler exists.
Compiled binaries are provided for the following OS environments.
- Various Linux distributions
- MacOSX
- Windows
InfluxDB Documentation
See the URLs below for InfluxDB documentation.
InfluxDB Download
InfluxDB packages for various operating systems are available at the URL below.
https://portal.influxdata.com/downloads
You can also view the source files on GitHub.
https://github.com/influxdata/influxdb