Skip to content
$ lynuxpro
← All system designs

SENIOR · 14 MIN · SRE · PLATFORM · DEVOPS

Monitoring and alerting for 100 services

Prometheus per cluster, long-term storage, logs and traces, SLO dashboards and alert routing that pages only for what matters.

Peak load
170,000 samples/s
Availability target
99.95% (alerting)
RTO: back up within
15 min
RPO: data you can lose
~2 hours buffered

← Swipe sideways to see the whole diagram →

ServiceInfrastructureData storeClientasync / background

The question

"Design monitoring and alerting for a company with 100 services running on several Kubernetes clusters in two regions."

Requirements

  • Metrics, logs and traces for every service, with standard dashboards.
  • SLOs per service, and alerts that page only when users are hurt.
  • Keep metrics for 13 months for capacity planning; logs 14 days hot, 1 year archived.
  • The monitoring system must keep working when a cluster is having problems.

Quick numbers

ItemAssumptionResult
Pods5,000each exposes ~500 time series
Active series5,000 × 500~2.5 million
Samplesevery 15 s~170,000 samples per second
Logs5,000 pods × 1 KB/s~5 GB/s raw, ~400 TB/day: needs sampling and dropping debug logs

How it works

  1. Every service exposes /metrics; node and kube-state exporters add cluster data. The OpenTelemetry collector gathers logs and traces.
  2. A Prometheus in each cluster scrapes every 15 seconds and evaluates recording rules and alert rules locally, so alerts still fire if the central system is down.
  3. Prometheus remote-writes to a long-term store (Mimir or Thanos on S3) for global queries and 13-month history.
  4. Logs go to Loki (cheap, label-indexed) and traces to Tempo.
  5. Grafana shows standard dashboards for every service (golden signals) and SLO burn charts.
  6. Alertmanager groups and de-duplicates alerts and routes them: critical burn-rate alerts page on-call through PagerDuty; warnings go to Slack or tickets.

Remember it: alert on symptoms (users see errors or slowness), investigate with causes (CPU, disk, queues) on dashboards.

Key decisions

DecisionChoiceWhy
Alert evaluationin each clusterno single point of failure for paging
Long-term storageobject storage (S3)cheap, durable, scales
Cardinalityban user IDs and request IDs as labelsstops series counts exploding
Pagingmulti-window burn-rate SLO alertspages fast for real outages, tickets for slow burns
Standardsdashboards and alerts generated from codeevery new service gets them for free

What breaks and how it heals

  • Who monitors the monitor? A dead-man's switch alert that always fires; if the paging service stops receiving it, it pages.
  • Cardinality explosion: per-tenant series limits in Mimir and alerts on series growth.
  • Alert storm in an outage: grouping by service and region plus inhibition rules (if the cluster is down, suppress the alerts for every pod in it).

Making it bigger

  • Shard Prometheus by team, or use the Prometheus Agent mode that only forwards.
  • Tail-based sampling for traces: keep slow and failed traces, sample the rest.

High availability and disaster recovery

TargetNumberHow it is met
Alerting availability99.95%two identical Prometheus replicas scrape the same targets; Alertmanager runs as a 3-node cluster and removes duplicates
Long-term store node failsno data lostMimir/Thanos keep 3 copies of new data across 3 AZs; blocks land in S3 (99.999999999% durability)
Remote write target downnothing lost for ~2 hoursPrometheus keeps a write-ahead log and retries; fix the store within that window
Grafana lostRTO 15 mindashboards and alert rules are code in Git; redeploy
Whole monitoring region failsyou still get pageda small "meta-monitoring" setup in another region, plus a dead-man's switch alert

What interviewers listen for

  • Numbers on series and log volume, and how you control cardinality and cost.
  • SLO-based alerting, routing and on-call health.
  • Resilience of the monitoring system itself.