ScriptsApr 11, 2026·3 min read

VictoriaMetrics — Fast Cost-Effective Time Series Database

VictoriaMetrics is a fast, cost-effective, and scalable monitoring solution and time series database. Drop-in Prometheus replacement with 7x better compression and scale to billions of metrics.

TL;DR
VictoriaMetrics is a Prometheus-compatible time series database with better compression, lower resource usage, and horizontal scaling.
§01

What it is

VictoriaMetrics is an open-source time series database and monitoring solution designed as a drop-in replacement for Prometheus. It stores metrics with significantly better compression (up to 7x compared to Prometheus), uses less memory and disk, and scales to billions of active time series.

VictoriaMetrics serves SREs, platform engineers, and DevOps teams who outgrow single-node Prometheus or need long-term metrics retention without the storage costs. It is compatible with PromQL, Graphite, InfluxDB, and OpenTSDB protocols.

§02

How it saves time or tokens

Migrating from Prometheus to VictoriaMetrics requires minimal configuration changes because it accepts the same remote_write protocol and understands PromQL. Existing Grafana dashboards work without modification. The reduced storage footprint means lower infrastructure costs: the same metrics that consume 100GB in Prometheus may use 14GB in VictoriaMetrics.

The single-binary deployment model (no external dependencies like ZooKeeper or etcd) simplifies operations.

§03

How to use

  1. Start a single-node instance with Docker:
docker run -d --name victoriametrics \
  -p 8428:8428 \
  -v vm-data:/victoria-metrics-data \
  victoriametrics/victoria-metrics
  1. Point Prometheus to VictoriaMetrics as a remote write target:
# prometheus.yml
remote_write:
  - url: http://victoriametrics:8428/api/v1/write
  1. Query via the built-in UI at http://localhost:8428/vmui or connect Grafana to http://victoriametrics:8428 as a Prometheus data source.
§04

Example

Querying VictoriaMetrics with MetricsQL (a PromQL superset):

# Standard PromQL works
rate(http_requests_total[5m])

# MetricsQL extensions: default values for missing series
http_requests_total default 0

# Range median (not available in standard PromQL)
median_over_time(cpu_usage[1h])

MetricsQL adds functions like default, keep_last_value, and median_over_time that simplify common monitoring queries.

§05

Related on TokRepo

§06

Common pitfalls

  • Assuming cluster mode is needed from day one. A single VictoriaMetrics node handles millions of metrics per second. Start with single-node and scale to cluster only when you hit resource limits.
  • Mixing retention periods without vmstorage partitioning. If you need 7-day hot and 1-year cold retention, use separate storage tiers or VictoriaMetrics Enterprise tiered storage.
  • Ignoring the deduplication setting when running multiple Prometheus instances. Enable -dedup.minScrapeInterval to avoid duplicate time series from HA Prometheus pairs.

Frequently Asked Questions

Can I use VictoriaMetrics as a drop-in Prometheus replacement?+

Yes. VictoriaMetrics accepts Prometheus remote_write protocol, understands PromQL queries, and works with existing Grafana dashboards. You can run both in parallel during migration and switch over gradually.

How much storage does VictoriaMetrics save compared to Prometheus?+

VictoriaMetrics typically achieves 7x better compression than Prometheus TSDB. The exact ratio depends on your metric cardinality and label patterns. High-cardinality metrics see the largest savings.

Does VictoriaMetrics support horizontal scaling?+

Yes. VictoriaMetrics Cluster mode separates storage (vmstorage), ingestion (vminsert), and querying (vmselect) into independently scalable components. You can add vmstorage nodes to increase capacity without downtime.

What query language does VictoriaMetrics use?+

VictoriaMetrics uses MetricsQL, a backward-compatible superset of PromQL. All valid PromQL queries work unchanged. MetricsQL adds extensions like default values for missing series, keep_last_value, and additional aggregation functions.

Is VictoriaMetrics free for production use?+

Yes. The single-node and cluster versions are open source under Apache-2.0. VictoriaMetrics Enterprise adds features like downsampling, mTLS, and tiered storage for a license fee.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets