Typorithm · easy

Buckets & Retention

bucket-retentioninfluxdbbucketsretentionstorage
Saved on this device
Full lesson · 8 learning steps Open any exercise for focused practice
1

Step 1 of 8 · intro card

Learn Buckets & Retention

0%

Buckets & InfluxQL

A bucket is InfluxDB's named, time-bounded store; --retention auto-expires old data so storage stays bounded.

In InfluxDB a bucket is the named container that holds your time-series points, the rough equivalent of a database.

influx bucket create makes one, and --retention sets the retention period: data older than that window is automatically deleted.

influx bucket list shows what exists, including each bucket's id and its retention policy.

01

A bucket is the named, time-bounded store.

02

--retention auto-expires data past the window.

03

bucket list shows ids and retention.

influx bucket create --name metrics --retention 30d
influx bucket list

Read the implementation

Connect each part of the code to the concept before you type.

1. Create a bucket

bucket create makes a named store; --retention sets how long data lives before it auto-expires.

influx bucket create --name metrics --retention 30d

2. Bucket name

--name gives the bucket a stable identifier you write to and query from.

--name metrics

3. Retention period

--retention 30d auto-deletes points older than 30 days, capping storage growth.

--retention 30d

4. List buckets

bucket list shows existing buckets with their ids and retention policies.

influx bucket list

A complete learning loop

01

Understand

Read the concept map and follow the code breakdown.

02

Reconstruct

Type the implementation, repair mistakes and work through every recall exercise.

03

Verify

Use the final check without hints; revisit weak concepts in short practice sessions.

Buckets & Retention: Lesson & Practice · Typorithm | ApplyDjinn