Design a Monarch-Style Global Time Series Metrics Store
Last updated: November 29, 2026
Quick Overview
Design an in-memory, globally distributed time series database for monitoring Google's production services, supporting high-cardinality labels, ingestion of billions of points per second, and fast queries for dashboards and alerting.
0
0
0 solved
Design an in-memory, globally distributed time series database for monitoring Google's production services, supporting high-cardinality labels, ingestion of billions of points per second, and fast queries for dashboards and alerting.
Google's internal monitoring is built on a planet-scale time series system, and SRE-adjacent infra teams ask this to check data modeling for metrics, write path design at extreme rates, and query fan-out across regions. The interviewer is looking for locality choices that keep monitoring working when parts of the network fail.
What the Interviewer Expects
- Define the data model: metric name, target labels, metric labels, typed points
- Design ingestion with regional collection and in-memory storage
- Explain aggregation at ingest to control cardinality
- Describe query execution with fan-out and push-down aggregation
- Address retention via downsampling and durable storage
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- Why keep monitoring data regional instead of one global store?
- How do you handle a team that emits a label with millions of values?
- How would you implement percentile queries over distribution metrics?
- How does alerting stay up if the global query layer is down?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: services emit counters, gauges and distributions with labels; users query with filters, group by and aligned windows (rate, sum, percentiles); alerts evaluate queries every 30 to 60 se...
High-Level Design
- Data model: a time series is identified by
(metric, target labels such as job/cluster/task, metric labels such as status code). Points are(timestamp, value), where value can be a distributi...