Metrics Monitoring

Agents push metric points through a quota-checking gateway into a durable buffer; TSDB writers compress with Gorilla while Flink evaluates alert rules in the same stream. Exactly-once paging is an atomic Redis claim plus a provider idempotency key, not a promise Redis can keep alone.

  • Ingest: 10M+ data points/sec
  • Writes: 99.99% availability
  • Queries: sub-second dashboards
  • Compression: Gorilla 10–12x · 64 MB MemTables
  • Retention: 7 d raw · 30 d @ 1 min · 1 y @ 1 h
  • Tenant cap: ~100,000 series/min · HTTP 429

Agents

Run on every host, collect metric points and flush them in batches to the API gateway, retrying with backoff on HTTP 429 or errors.

API gateway

Authenticates the tenant, checks its Redis quota and active-series count, and writes accepted batches to the durable buffer.

Redis

Holds per-tenant quota and active-series counters for the gateway, and the alert firing-state keys Flink claims before a page goes out.

Ingestion buffer

A durable queue between the gateway and everything downstream. Writers and Flink both consume the same stream at their own pace.

TSDB writers

Consume the buffer, compress points with Gorilla (delta-of-delta timestamps, XOR values) at 10–12x, and append through 64 MB MemTables into LSM-tree SSTables.

Time-series store

The durable home of raw points: LSM-tree SSTables, Gorilla-compressed. Source of truth for the last 7 days of raw data.

PostgreSQL

Holds tenants, metric metadata and alert rules. Rule changes leave by change data capture to Flink.

Flink alert engine

Consumes the same stream as the writers, evaluates alert rules in memory over sliding windows with watermarks, at parallelism 64 across 8 TaskManagers of 8 slots.

Notification service

Delivers the page, email or chat message for a claimed alert, passing the claim id as an idempotency key to the provider.

Spark roll-ups

Batch jobs that downsample raw points to 1-minute and then 1-hour resolution and write them to S3.

S3 cold storage

Holds 1-minute and 1-hour roll-ups and Flink checkpoints.

Dashboards

Answers queries: the time-series store for under 24 hours, S3 roll-ups beyond.