The Mistake: Using high-cardinality values as tags (device UUIDs, user IDs, session tokens) instead of fields, causing memory exhaustion and query performance collapse.
Why It Happens: Tags are indexed for fast filtering, so developers instinctively make every queryable attribute a tag. They don’t realize InfluxDB stores one time-series per unique tag combination in memory. With 100,000 devices as tags, you create 100,000 in-memory series–even if each device has only one reading.
The Fix:
# WRONG: device_id as tag creates 100K series
measurement: temperature
tags: {device_id=uuid-12345-...} # High cardinality!
fields: {value=23.5}
# CORRECT: device_id as field, use coarse tags
measurement: temperature
tags: {region=us-west, building=hq} # Low cardinality
fields: {value=23.5, device_id="uuid-12345-..."}
Cardinality limits to remember: - InfluxDB OSS: ~1 million series before severe degradation - InfluxDB Cloud: Charged per series (100K series = ~$50/month overhead) - Rule of thumb: Tags should have <10,000 unique values - Query by high-cardinality field: Use |> filter(fn: (r) => r.device_id == "uuid-...")