Prompt
I'm building an application that stores counters and gauges at scale, which database would you pick?
Latest observation
If your app is mostly counters and gauges at scale, I’d usually pick a time-series database first, unless your access patterns are very simple and you need ultra-low operational complexity.
My default pick
ClickHouse if you want:
- very high ingest rates
- cheap long-term storage
- fast aggregations over large volumes
- flexible SQL querying
- counters/gauges plus analytics
It’s often a strong choice for metrics-like data when you need both write scale and ad hoc queries.
Other good options, depending on the workload
1) Prometheus + remote storage / Mimir / Thanos
Best if this is specifically observability metrics:
- counters and gauges are first-class
- great ecosystem
- good for short-to-medium retention and alerting
But plain Prometheus doesn’t scale as a general-purpose long-term database by itself.
2) VictoriaMetrics
Very strong choice for metrics-heavy workloads:
- optimized for counters/gauges
- high compression
- simpler ops than some alternatives
- good PromQL compatibility
If your data is primarily metrics, this is one of the best practical answers.
3) TimescaleDB
Best if you want:
- SQL + PostgreSQL ecosystem
- time-series features on top of Postgres
- moderate-to-high scale, but not extreme ingest in the same class as ClickHouse/VictoriaMetrics
Great if you already use Postgres and want to stay there.
4) Cassandra / ScyllaDB
Choose this if you need:
- massive write throughput
- predictable horizontal scaling
- simple key-based reads
Good for raw counters/gauges if your queries are mostly by key and time window. Less ideal for rich analytics.
Quick recommendation
- Metrics/observability use case: VictoriaMetrics
- Analytical querying over large metric volumes: ClickHouse
- Postgres-friendly time series: TimescaleDB
- Very large simple key/value scale: ScyllaDB/Cassandra
If you want, I can recommend one based on:
- expected write rate,
- retention period,
- query patterns,
- whether you need PromQL/SQL,
- cloud vs self-hosted.