SRE & Observability (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is High-Cardinality and High-Dimensionality in Observability?
senior Levelsre-observabilityAdvanced Internals
In Simple Words:
- Cardinality: The number of unique values in a set.
- The Problem in Time-Series DBs (Prometheus): Putting high-cardinality labels (like
user_id,order_id, oruuid) on a Prometheus metric creates millions of independent time-series streams in memory, causing Prometheus to crash with OOM! - Solution: High-cardinality values belong in Distributed Tracing Spans and Structured Logs, while metrics must be restricted to low-cardinality tags (
http_status,method,region).