InfluxDB: Time-Series Modeling, Cardinality and Retention

A purpose-built time-series database across two incompatible generations - where the tag you chose decides whether it works.

Taught by Noshad Alam 7 lessons 1 hr 6 min Published 30 Nov 2026

InfluxDB is built for one shape of data: measurements taken at points in time, with labels, written far more often than they are read, queried almost always over a time range, and usually aggregated. Everything about it follows from that - the storage layout is time-ordered and heavily compressed, the write path is append-optimised, timestamps are not a column but *the* column, and data expires on a schedule rather than being deleted.

Overview

**Two things make this course different from the rest of the programme.**

The first is that **InfluxDB has two incompatible generations and you must choose deliberately.** InfluxDB **2.x** stores data in its own TSM engine and is queried with **Flux**, a purpose-built scripting language, or InfluxQL. InfluxDB **3.x** is a rewrite on Apache Arrow, DataFusion and Parquet, is queried with **SQL** and InfluxQL, and **does not support Flux at all**. They are different databases wearing one name: different query languages, different storage, different operational characteristics and different editions. **A tutorial you find online is for one of them and will not work on the other**, which is the single most common source of frustration here. Module 1 makes the choice explicit and the course covers both where they differ.

The second is **cardinality**, which is InfluxDB's defining engineering constraint. A **series** is the combination of a measurement name and one particular set of tag values, and the number of distinct series is the number that determines whether your deployment works. A tag holding a request id, a user id, a container id or a trace id produces unbounded cardinality, and in 2.x that fills memory and the database stops. **3.x handles high cardinality far better and it still matters** - so the discipline is the same and the ceiling is higher. **Module 2 therefore spends its time on tag design, because that is the decision that cannot be undone.**

Seven modules, about 75 hours. The capstone is an industrial telemetry dashboard with late-event handling, rollups and retention tests.

Introduction

This course assumes the programme's shared foundations. If you have done the PostgreSQL course the SQL in 3.x will be familiar; Flux will not be familiar to anyone, because it is unlike anything else, and it is covered only to the depth a 2.x deployment needs.

For a sandbox, pick a generation and commit for the course. **InfluxDB 3 Core** runs locally in Docker and is the right choice for new work, which makes it this course's default - its SQL is standard, its storage is Parquet, and it is where the product is going. **InfluxDB 2.7 OSS** is also Docker-simple and is what the large installed base runs, so the laboratories include it where the differences matter. Run both if you can; the comparison is instructive and the second one takes twenty minutes.

You also need a **telemetry generator**. Write one in Module 1 that produces realistic industrial data - several sites, several machines per site, several sensors per machine, at a configurable rate, with controllable tag cardinality and the ability to emit **late** points. That generator is used by every subsequent module, and the late-point capability is what makes Module 3 and the capstone possible.

One habit from the start: **count your series.** Before and after every modelling change, measure the series cardinality. It is the number that predicts whether the deployment survives, and it grows quietly.

What you will be able to do

  • Explain measurements, tags, fields, timestamps and series
  • State the differences between InfluxDB 2.x and 3.x, and choose deliberately
  • Write line protocol correctly, including timestamp precision
  • Design a tag and field schema that bounds cardinality
  • Explain why a high-cardinality tag is the characteristic failure, and measure it
  • Query by time range with pruning, in SQL, InfluxQL and Flux as appropriate
  • Window and aggregate over time, including gap handling
  • Build downsampling rollups and explain why they are necessary
  • Handle late-arriving data correctly, and state what it does to a rollup
  • Configure retention and explain what expiry actually removes
  • Measure and improve ingestion throughput with batching
  • Reason about compression and the storage layout per generation
  • Diagnose a slow query and distinguish pruning from aggregation cost
  • Plan recovery, including replay from a durable event source
  • Perform backup and restore where the edition supports it
  • Implement token-based authentication and least privilege
  • Produce a deployment, retention and cost checklist

What each level covers

5 levels · 7 lessons

  1. Beginner - Foundations

    The data model, the generation choice and line protocol; then the tag design that decides everything.

    2 lessons 18 min of reading

    Start with Measurements, Tags, Fields, Line Protocol and the Version Choice →
  2. Intermediate - Application Behaviour

    Windowing and rollups, retention, and the late-data problem that defines time-series engineering.

    1 lesson 10 min of reading

    Start with Windowing, Downsampling, Retention and Late Data →
  3. Advanced - Performance and Reliability

    Ingestion, compression and query cost; then recovery, which here means replay.

    2 lessons 19 min of reading

    Start with Cardinality Cost, Batch Writes, Compression and Benchmarks →
  4. Expert - Security and Production Architecture

    Tokens and least privilege, monitoring the right numbers, and the retention cost that is the whole bill.

    1 lesson 10 min of reading

    Start with Tokens, TLS, Monitoring, Retention Cost and Upgrades →
  5. Capstone

    One telemetry dashboard, defended on bounded cardinality, correct rollups under late data and a priced retention policy.

    1 lesson 9 min of reading

    Start with Capstone - Industrial Telemetry Dashboard →

Guides and articles

Longer reading about this subject, written alongside the course.

Course guide How to work through this course Why to choose a generation first, the cardinality habit, the late-data experiment, and what to skip. 4 min read

Before you start

  • Docker, and InfluxDB 3 Core or InfluxDB 2.7 OSS
  • Python 3.11 or later with the matching Influx client
  • A telemetry generator you write, with configurable cardinality and late points
  • The programme's shared foundations

Common questions

What does the InfluxDB: Time-Series Modeling, Cardinality and Retention course cover?
It is 5 levels and 7 lessons: Beginner - Foundations; Intermediate - Application Behaviour; Advanced - Performance and Reliability; Expert - Security and Production Architecture; Capstone. Each level ends with a quiz, and the last one is an exam over the whole course.
How long does it take?
About 66 minutes of reading and exercises - roughly 1.1 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
What do I need to know first?
Docker, and InfluxDB 3 Core or InfluxDB 2.7 OSS. Python 3.11 or later with the matching Influx client. A telemetry generator you write, with configurable cardinality and late points. The programme's shared foundations.
Is it free?
Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
What will I be able to do afterwards?
Explain measurements, tags, fields, timestamps and series. State the differences between InfluxDB 2.x and 3.x, and choose deliberately. Write line protocol correctly, including timestamp precision. Design a tag and field schema that bounds cardinality. Explain why a high-cardinality tag is the characteristic failure, and measure it. Query by time range with pruning, in SQL, InfluxQL and Flux as appropriate. Window and aggregate over time, including gap handling. Build downsampling rollups and explain why they are necessary. Handle late-arriving data correctly, and state what it does to a rollup. Configure retention and explain what expiry actually removes. Measure and improve ingestion throughput with batching. Reason about compression and the storage layout per generation. Diagnose a slow query and distinguish pruning from aggregation cost. Plan recovery, including replay from a durable event source. Perform backup and restore where the edition supports it. Implement token-based authentication and least privilege. Produce a deployment, retention and cost checklist.