Engineering Note

Prometheus was handling our metrics. But it wasn't necessarily the right place for every metric we wanted to store.

As SaaS applications grow, the amount of time-series data grows with them.

CPU and memory usage.
API response times.
Database performance.
Background job latency.
Customer activity.
Business metrics.

Initially, Prometheus can handle a lot of operational monitoring.

But requirements change.

You may need longer retention, high-cardinality data, historical analysis or queries across millions of time-series records.

That's when database architecture becomes important.

Different tools solve different problems:
Prometheus
Great for infrastructure monitoring, application metrics, alerting and operational visibility.

TimescaleDB
Useful when you want time-series capabilities alongside PostgreSQL and SQL-based analysis.

InfluxDB
Designed for time-series workloads, ingestion and time-based queries.

ClickHouse
Worth considering for high-volume analytical workloads and aggregations across large datasets.

But moving everything into a specialised database isn't automatically an improvement.

You introduce more infrastructure, data pipelines, retention policies and operational responsibilities.

Important learning:
Don't choose a time-series database just because your metrics volume is growing.

First understand:
- How frequently are metrics collected?
- How much historical data must be retained?
- What is the query pattern?
- Are you dealing with high-cardinality labels?
- Is the workload operational monitoring or business analytics?

The right database depends on how you use the data, not just how much data you collect.