System Design Space
Knowledge graphSettings

Updated: June 24, 2026 at 5:53 PM

VictoriaMetrics: history and architecture

medium

VictoriaMetrics from a system design perspective: time-series storage, long metric history, Prometheus-compatible APIs, vmagent/vminsert/vmstorage/vmselect, cluster mode, and operating cost.

VictoriaMetrics becomes genuinely interesting once a classic Prometheus stack starts hurting from scale, long metric history, or expensive historical queries.

In engineering practice, this chapter helps you see how compression, retention windows, vmagent, vminsert, and the split between write and read paths turn into monitoring economics rather than just technical details.

In interviews and engineering discussions, it is especially useful when you need to explain how VictoriaMetrics differs from a baseline Prometheus approach once scale and cost become first-class constraints.

Practical value of this chapter

Long-term metrics economics

Design long-horizon metrics retention with explicit compression, retention, and historical read-cost assumptions.

Ingestion pathways

Shape vmagent/vminsert routes for burst traffic and resilience under temporary failures.

Tenant isolation

Model multi-tenant quotas so one team cannot degrade observability quality for others.

Interview comparison

Differentiate VictoriaMetrics from classic Prometheus for scale-heavy and cost-sensitive scenarios.

Decision frame and editorial focus

Chapter focus

VictoriaMetrics architecture and cost-efficient metric storage

Workload profile

Start from the specialized query: analytics, search, time series, graph traversal, vector retrieval, or monitoring metrics.

Good fit

The choice is justified when the index or storage model directly matches product behavior and relieves the source of truth.

Boundary and risk

The danger is turning a specialized layer into a universal database and losing consistency, freshness, and ownership boundaries.

Connect next

Connect the chapter to the OLTP source, data pipeline, retention/compaction, and read-model architecture.

Source

VictoriaMetrics docs

Official documentation for VictoriaMetrics architecture, components, and operating model.

Перейти на сайт

VictoriaMetrics answers a specific pain: metrics keep growing, storing them long is expensive, and the operational path starts to choke on high cardinality. It is a high-performance TSDB built for cost-efficient metric storage and a scalable observability path. In the practical TSDB map it usually sits alongside Prometheus — as a backend for long metric history and high-cardinality workloads.

History: key milestones

2018

Public launch

VictoriaMetrics was released as an open-source time-series database — a bet that metrics could be stored denser and cheaper than the usual stack allowed.

2019

Performance and storage density focus

The project's main argument was cost: the same metric history fits in less space, which positioned VictoriaMetrics as a low-resource option for Prometheus-compatible workloads.

2020

Cluster profile maturation

The vmselect/vminsert/vmstorage architecture splits reads and writes into separate roles — exactly what lets it scale horizontally instead of hitting the ceiling of a single node.

2021

Ecosystem expansion

vmagent, vmalert, and multi-tenancy grew around the core — the points where VictoriaMetrics stops being just storage and becomes a collection and alerting loop.

2023

Production-scale adoption

Migrating from Prometheus-based stacks for long retention turned into a routine task rather than an enthusiast's experiment.

2024+

Observability-stack evolution

Cluster deployment, cost control, and enterprise-monitoring integration shifted from project decisions to settled practice.

What makes VictoriaMetrics different

Prometheus-compatible interface

Compatibility with the Prometheus API, remote_write, and remote_read means dashboards and alerts move over without rewriting — the cost of entry is mostly wiring up writes, not learning a new query model.

Efficient metric storage

Storage optimizations and background merges deliver the thing teams come for: long metric history on noticeably less disk. The direct consequence is a predictable storage bill over long horizons.

Cluster architecture

Splitting vmagent/vminsert/vmstorage/vmselect turns the write and read paths into separate, observable segments. When ingestion stalls or queries slow down, it is clear which role to scale instead of growing the whole node at once.

Rule-driven monitoring

vmalert plus Alertmanager integration gathers recording and alerting rules into one controlled loop. The incident signal then lives next to the metrics rather than in a separate, disconnected subsystem.

VictoriaMetrics architecture by layers

At a high level, the flow is: metric ingestion -> write routing -> data parts and background merges -> parallel reads -> rules and alerts -> external integrations.

Ingestion layer
vmagentPrometheus scraperemote_write ingestRelabeling
Layer transition
Write routing
vminsertShard routingTenant routingReplication fan-out
Layer transition
Storage layer
vmstorageCompressed partsBackground mergeRetention cleanup
Layer transition
Query execution
vmselectFan-out readsDeduplicationMetricsQL/PromQL
Layer transition
Rules and alerting
vmalertRecording rulesAlerting rulesAlertmanager
Layer transition
Integrations and operations
Single-node/clusterGrafanavmauthBackup/restore

Key features

VictoriaMetrics is optimized for cost-efficient metric storage, Prometheus-compatible APIs, and growth from single-node to cluster deployments.

Compression and storage

High storage densityPart mergingLong retention profile

Prometheus compatibility

PromQL-compatible APIremote_write/readGrafana integration

Scalability

Cluster modeTenant isolationHorizontal scale-out

Configuration and data in VictoriaMetrics

Like most TSDB engines, VictoriaMetrics has no literal SQL DDL/DML layer. So when reasoning about the system, it helps to hold two separate planes in mind: configuration and topology changes on one side, data operations (ingesting samples, writing, storing, reading them through queries) on the other. Blurring the two during design is a reliable way to lose track of what changes and when.

How configuration and data change in VictoriaMetrics

Configuration changes topology. Data flows from sample ingestion to query execution.

Interactive replayStep 1/5

1. Ingest metric samples

Metrics and queries

vmagent or remote_write sends fresh metrics to the write endpoint.

2. Parse and relabel

Metrics and queries

Samples are parsed, labels are enriched, and data is prepared for routing.

3. Route through vminsert

Metrics and queries

vminsert distributes data to vmstorage nodes using hash/tenant routing.

4. Append and merge in vmstorage

Metrics and queries

vmstorage appends samples to local parts and merges them in the background.

5. Read through vmselect

Metrics and queries

vmselect fans out across shards, applies dedup/aggregation, and returns results.

Active step

1. Ingest metric samples

vmagent or remote_write sends fresh metrics to the write endpoint.

Metric and query path

  • The data path covers sample ingestion, storage, compaction, and query execution.
  • In cluster mode, write and read paths scale horizontally across shards.
  • Label cardinality and tenant skew are key drivers of latency and cost.

Source

Prometheus docs

Reference context for a Prometheus-compatible observability stack.

Перейти на сайт

VictoriaMetrics and Prometheus: practical comparison

Core profile

VictoriaMetrics: Center of gravity is cost-efficient storage and independently scalable write and read paths, while staying Prometheus-compatible.

Prometheus: Canonical monitoring stack with pull-based collection, PromQL, and a built-in TSDB for operational use.

Query model

VictoriaMetrics: PromQL-compatible queries plus MetricsQL, which adds functions for production analytics on top of the familiar syntax.

Prometheus: PromQL as the baseline language for metric analysis and alert-driven workflows.

Scalability

VictoriaMetrics: Cluster mode (vminsert/vmstorage/vmselect) is built for large-scale data and long-term retention — growth is baked into the architecture rather than bolted on.

Prometheus: Often scaled via single-node + federation/remote storage patterns.

Operating model

VictoriaMetrics: Often takes the role of a consolidated metrics backend in large observability platforms — the point where data from many stacks converges.

Prometheus: Often acts as the primary collection and rule engine with external long-term storage integration.

When VictoriaMetrics is chosen in operations

When VictoriaMetrics is the justified choice — short signals for system design:

  • The main case for VictoriaMetrics is cost: high storage efficiency keeps the bill for long metric history predictable for years.
  • Prometheus compatibility lowers migration effort — existing dashboards and alert definitions move over as-is, so the switch is not a rewrite project.
  • Separate write and read paths across vmagent/vminsert/vmstorage/vmselect scale independently per shard, so a bottleneck is fixed in place rather than by growing the whole cluster.
  • Single node to start, cluster as you grow — moving between modes gives a path from a small setup to large-scale production without swapping the technology.

References

Related chapters

Enable tracking in Settings