Metrics / Monitoring System

About Metrics / Monitoring System

Time-series at scale. Cardinality is the enemy.

Difficulty
intermediate
Time
about 108 minutes
Stages
9
Topic
Observability: Metrics, Logs & Traces

How this problem is worked

Nine stages, from what the thing is for to how it compares with the real implementations. Each asks one question, and the simulator runs the architecture you draw against the requirements you wrote.

  1. 01Purpose & invariantsWhat is this for, and what must always be true of it?
  2. 02Workload characterizationWho writes, who reads, and in what shapes?
  3. 03Data model & on-disk formatWhat does the data look like at rest?
  4. 04Core algorithmsHow do the write path and the read path actually work?
  5. 05Distribution & replicationHow does this scale out and survive losing a machine?
  6. 06Consistency & correctnessUnder concurrency and failure, what is guaranteed?
  7. 07Failure modes & recoveryWhat actually happens when each part fails?
  8. 08Operational characteristicsCan a human run this at three in the morning?
  9. 09Trade-offs & comparisonWhere does this sit against the alternatives?

Primary sources for this problem

  • Google SRE Book — ch. 6 Monitoring Distributed Systems; SRE Workbook — Alerting on SLOs
  • Prometheus docs — metric types, histograms and summaries, alerting rules, federation, remote-write tuning
  • Brian Brazil — Rate then sum, never sum then rate / Cardinality is key (robustperception.io)
  • Grafana Mimir architecture docs — distributor, ingester, HA deduplication, compactor, query-frontend, limits
  • Thanos docs — compactor, downsampling and deduplication
  • Adams et al. — Monarch: Google's Planet-Scale In-Memory Time Series Database (VLDB 2020)
  • Pelkonen et al. — Gorilla: A Fast, Scalable, In-Memory Time Series Database (VLDB 2015)
  • AWS Builders' Library — Workload isolation using shuffle-sharding

Browse the full problem catalog, or see what the simulator does and does not model.