Cortex

active

by Cortex community (CNCF) · since 2016 · also known as Cortex Metrics, cortexproject

CNCF multi-tenant, horizontally scalable long-term storage for Prometheus metrics on object storage.

time-seriesdatabase engineopen source (permissive)mature

Overview

Cortex is the original horizontally scalable, multi-tenant Prometheus backend, started at Weaveworks in 2016 and now a CNCF incubating project. Prometheus servers or agents remote-write into distributors, ingesters batch samples into TSDB blocks on object storage, and queriers and store-gateways answer PromQL across tenants with per-tenant limits, a ruler and an Alertmanager. Grafana Mimir forked from it in 2022, but Cortex continues under vendor-neutral Apache-2.0 governance, with recent releases adding a Parquet mode for store-gateways and Prometheus remote write 2.0. Choose it when you want Mimir-style architecture without AGPL.

Strengths & trade-offs

Strengths

  • +True multi-tenancy with per-tenant limits, rules and Alertmanager
  • +Apache-2.0 and vendor-neutral CNCF governance
  • +Object storage keeps long retention cheap
  • +Global PromQL view across many Prometheus sources
  • +Mature design that underpins several managed Prometheus services

Trade-offs

  • −Many microservices to deploy and tune
  • −Smaller contributor base since Grafana Labs moved to Mimir
  • −Fewer performance features than Mimir's newer query engine
  • −Overkill for a single small cluster

Great for

  • +Internal metrics-as-a-service for many teams
  • +Long-term Prometheus storage on object storage
  • +Multi-tenant SaaS monitoring backends

Think twice for

  • −Small single-cluster setups
  • −Logs and traces
  • −SQL analytics

Capabilities

Native or official first-party support · 4 of 25 tracked

✓TTL / expiry
✓Durable persistence
✓Compression
✓Streaming ingest
–Transactions
–Joins
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–Pub/Sub
–Columnar storage
–In-memory
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Massive · Multi-PB
Horizontal scaling
Native
Multi-region
No
Transactions
None
Consistency
Eventual
Schema
Schemaless
Architecture
Distributed, Shared storage
Query languages
PromQL

Microservices scale independently; blocks live in S3, GCS, Azure Blob or Swift.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withPrometheus, S3
apis & protocolsPrometheus remote write (v1 and v2), Prometheus HTTP query API, OTLP, Ruler and Alertmanager APIs

Alternatives to Cortex

Compare all→
Grafana MimirTime-Series15.8

Grafana Labs' horizontally scalable, multi-tenant long-term store for Prometheus and OTLP metrics.

cortex vs grafana-mimir →
ThanosTime-Series13.1

Sidecar-plus-object-storage layer giving Prometheus global queries, HA dedup and long retention.

cortex vs thanos →
VictoriaMetricsTime-Series26.8

Resource-frugal, Prometheus-compatible metrics database, run as a single binary or a sharded cluster.

cortex vs victoriametrics →
M3DBTime-Series4.2

Uber-born distributed TSDB and aggregator for Prometheus-scale metrics with tunable replication.

cortex vs m3db →
PrometheusTime-Series70.8

CNCF-graduated pull-based monitoring system with a local TSDB, PromQL and alerting rules.

cortex vs prometheus →
Grafana LokiTime-Series28.7

Label-indexed log aggregation: Prometheus-style streams, chunks on object storage, LogQL queries.

cortex vs grafana-loki →

Cortex FAQ

What is Cortex?

Cortex is a time-series database by Cortex community (CNCF), first released in 2016. Cortex is the original horizontally scalable, multi-tenant Prometheus backend, started at Weaveworks in 2016 and now a CNCF incubating project. Prometheus servers or agents remote-write into distributors, ingesters batch samples into TSDB blocks on object storage, and queriers and store-gateways answer PromQL across tenants with per-tenant limits, a ruler and an Alertmanager. Grafana Mimir forked from it in 2022, but Cortex continues under vendor-neutral Apache-2.0 governance, with recent releases adding a Parquet mode for store-gateways and Prometheus remote write 2.0. Choose it when you want Mimir-style architecture without AGPL.

Is Cortex open source?

Yes. Cortex is open source. License: Apache License 2.0.

Does Cortex support ACID transactions?

No. Cortex does not provide ACID transactions; its consistency model is eventual.

Does Cortex scale horizontally?

Cortex scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at massive scale (Multi-PB).

How can I run Cortex?

You can self-host it.

What is Cortex best for?

Cortex is a strong fit for internal metrics-as-a-service for many teams, long-term Prometheus storage on object storage and multi-tenant SaaS monitoring backends. Think twice for small single-cluster setups.

What are the best alternatives to Cortex?

Common alternatives to Cortex include Grafana Mimir, Thanos, VictoriaMetrics, M3DB and Prometheus. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Cortex?

Cortex ranks #347 of 844 databases on the WhichDB Score (7.2/100), and #18 among time-series databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.