Why InfluxDB Is a Must in Your IoT Application

Stefano Troìa
The Startup
Published in
3 min readNov 7, 2019

--

InfluxDB is an open-source database built for time-series data and written in GO. It is easy to install it’s enough to run a docker container with no other dependencies, although full power can be unleashed using all the TICK suite(Telegraf, Influx, Chronograf, Kapacitor)

Skipping presentations Influx is a very goodly distributed NoSQL database, but don’t worry you will be able to write SQL-like queries.

Data structure

Influx offers a data-structure similar to a SQL DB :

  • Measure: it’s like a table and the primary key will be the timestamp.
  • Point: it’s comparable to a row in an RDBMS, it indicates the measure in a specific time. Every point consists of tags and fields.
  • Field: is the data of your point and you can insert multiple fields.
  • Tags: are additional data to your point, they are indexed, usually used in query filtering.

So supposing we want to track the temperature of multiple buildings, we will have a data structure similar to this:

  • Measure = temperature
  • Retention policy = hourlyPolicy
  • Tags = [building,company]
  • Field = value

--

--