Design a Time-Series Metrics Store for Fleet Monitoring
Last updated: November 29, 2026
Quick Overview
Design a monitoring backend that ingests CPU, latency, and error metrics from millions of servers every few seconds and answers dashboard and alerting queries over the last 26 hours in milliseconds.
Meta
November 29, 20260
0
0 solved
Design a monitoring backend that ingests CPU, latency, and error metrics from millions of servers every few seconds and answers dashboard and alerting queries over the last 26 hours in milliseconds.
Meta's infrastructure teams built in-memory time-series databases (Gorilla) for this workload, so production engineers and infra SWEs often get this prompt. The interviewer checks compression, the hot versus cold split, and how alerting stays reliable when the store is degraded.
What the Interviewer Expects
- Estimate ingestion rate and memory needs
- Use delta-of-delta timestamps and XOR value compression
- Keep recent data in memory and roll older data to downsampled durable storage
- Shard by series key and support aggregation across shards
- Keep alerting available during partial outages
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
- How would you handle a deploy that creates millions of new series via a bad tag?
- How do you compute p99 latency across 10,000 hosts?
- Should alerts read from the same store as dashboards?
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: write (series_key, timestamp, value); query a series or aggregate (sum, avg, percentiles) across tag filters over a time range; alert rules evaluated every minute.
**Non-functional:*...
High-Level Design
- Agents on hosts push batches to an ingestion tier, which routes by
hash(series_key)to TSDB shards. - Each shard keeps the last 26 h in memory, compressed, with an append log on local disk...