Design Metrics Collection and Alerting Across ByteDance Microservices
Last updated: November 29, 2026
Quick Overview
Design an internal metrics platform where tens of thousands of services emit counters, gauges and latency histograms, engineers query dashboards over recent and historical data, and alert rules fire within a minute.
ByteDance
November 29, 20260
0
0 solved
Design an internal metrics platform where tens of thousands of services emit counters, gauges and latency histograms, engineers query dashboards over recent and historical data, and alert rules fire within a minute.
ByteDance operates an enormous microservice fleet across many regions, and observability infrastructure is a frequent system design topic for backend and SRE candidates. The interviewer checks cardinality control, the ingestion path, time-series storage with downsampling, and alert evaluation that does not depend on slow queries.
What the Interviewer Expects
- Estimate series count and samples per second, and call out cardinality as the main risk
- Aggregate locally in agents before shipping
- Use a queue-backed ingestion path and a time-series store with compression
- Downsample and tier retention
- Evaluate alerts on a streaming or near-real-time path with deduplication and routing
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
- A team adds user_id as a label and ingestion melts: how do you protect the system?
- How do you compute accurate p99 across hosts?
- Cross-region: query globally or keep metrics local?
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: push or pull metrics with labels, query by label and time range with aggregations, dashboards, alert rules with thresholds and durations, notifications to on-call. Non-functional: ingest a...
High-Level Design
An agent on each host receives metrics from local processes, pre-aggregates over 10 seconds, and ships batches to regional ingestion gateways, which validate, enforce per-service quotas, and write to ...