Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 39 ยท Getting Started

What Is InfluxDB?

Learn what InfluxDB is, why time-series databases exist, what kinds of data they store, and what you will build and run in this course.

A server logs its CPU load every ten seconds. A greenhouse sensor reports temperature every minute. A shop records every order the moment it happens. All of this data has one thing in common: each value is stamped with the time it was measured, and new values keep arriving forever. This is time-series data, and InfluxDB is a database built specifically to store and query it.

In this course you will learn InfluxDB from the first write to dashboards, downsampling, scaling and real projects. You will also learn the general ideas behind every time-series database, so what you learn here transfers to other products.

An honest note about what runs on this site. The real InfluxDB server cannot run inside your browser. Whenever a lesson shows InfluxDB commands (the influx CLI, influxdb3, Flux, line protocol over HTTP), they appear in read-only blocks. The runnable examples are small, clearly labelled stand-ins: portable SQL in a real SQLite engine, and JavaScript code that mimics what the database does. We say which is which every time, and the read-only commands are written for the current releases of InfluxDB.

What makes time-series data special

Ordinary application data, such as users or products, is mostly updated in place. A user changes their email and the old row is overwritten. Time-series data behaves differently:

  • Append-mostly. New points arrive in time order and are almost never updated afterwards.
  • Time is the main axis. Nearly every question has a time range: "the last hour", "this week versus last week".
  • High volume. A thousand sensors reporting every second produce 86 million points per day.
  • Value decays. Yesterday's per-second readings matter less than today's, so you want to keep old data in a cheaper summarized form.
  • Queries aggregate. You rarely read one point. You ask for the average per five minutes, the maximum per day or the rate of change.

A general-purpose database can store this, and for small projects it works fine (you will see that later in this chapter). But at scale you want a system tuned for it: fast ingestion of timestamped points, compression of repeating values, automatic expiry of old data, and a query language with time-aware functions.

What InfluxDB gives you

InfluxDB is an open-source time-series database made by InfluxData. Its main features are:

  • A data model built around timestamps: measurements, tags, fields and time (Measurements, Tags and Fields).
  • A simple text write format called line protocol and an HTTP API to send it (Line Protocol).
  • Query languages for time-aware analysis: Flux and InfluxQL in the 2.x line, SQL and InfluxQL in 3.x (Flux Basics, SQL Time-series Queries).
  • Retention policies that delete data after a set time, and downsampling tasks that keep summaries.
  • Tools around it: dashboards, alerts, the Telegraf collection agent and client libraries for many languages.

Where time-series data comes from

Time-series workloads fall into a few families. Recognising which one you have helps you design the data model later.

Where time-series data comes from

Infrastructure CPU, memory, disk, network
IoT sensors Temperature, humidity, GPS
Applications Latency, errors, requests
Business Orders, prices, traffic

All of them are values stamped with a time

1 / 2

A tiny time series in plain code

Before any database, look at what a series is. This stand-in is plain JavaScript, not InfluxDB. It stores temperature readings as an array of points and answers a typical time-series question: the average per hour.

JS A time series is values plus timestamps

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Grouping by a time bucket and aggregating is the single most common time-series operation. In InfluxDB you will write it as aggregateWindow in Flux or date_bin / GROUP BY time() in SQL and InfluxQL.

The same idea in SQL

Here is the same question with SQL. This runs in a real SQLite engine in your browser, not in InfluxDB, but the thinking is identical: a table with a time column, filtered by range and grouped by bucket.

SQL Average per hour in SQL (SQLite stand-in)

Press Run (or Ctrl + Enter) to see the result here.

How InfluxDB compares with a normal database

Need Typical relational table InfluxDB
Insert millions of points per minute Possible with tuning Designed for it
Expire data older than 30 days Write your own job Built-in retention
Average per 5 minutes Hand-written bucketing Native window functions
Compress repeated values Mostly manual Columnar compression
Update a row in place Easy Not the goal: you overwrite by writing the same point again
Complex joins across many entities Strength Possible, but not the focus

InfluxDB is not a replacement for your orders or users database. It is the right place for the stream of measurements about them.

How the rest of the course is organised

flowchart LR
  A["Getting started"] --> B["Data model"]
  B --> C["Writing data"]
  C --> D["Querying"]
  D --> E["Retention"]
  E --> F["Dashboards and alerts"]
  F --> G["Scaling"]
  G --> H["Integrations"]
  H --> I["Projects"]

The course follows the life of a data point: model it, write it, query it, age it, show it, scale it.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which description best fits time-series data?

    Time-series data is append-mostly: every point carries a timestamp and new points keep arriving.
  2. 2. What is the most common operation on time-series data?

    Questions such as average per five minutes or maximum per day are aggregations over time buckets.
  3. 3. Why does this site show InfluxDB commands in read-only blocks?

    The InfluxDB server is a separate process. The runnable code here uses SQLite and JavaScript as honest stand-ins.
  4. 4. Why do time-series databases offer retention policies?

    Raw high-frequency data loses value quickly, so you drop it or keep a summary.

Summary

  • Time-series data is a stream of timestamped values: metrics, sensor readings, events.
  • It is append-mostly, high volume, time-centric and queried through aggregation.
  • InfluxDB is a database built for it, with a time-based data model, a simple write format, time-aware queries and automatic expiry.
  • In this course, real InfluxDB commands are read-only; runnable code uses SQLite and JavaScript stand-ins that are labelled.

Next: InfluxDB Versions and Editions