Design Fleetwide Latency Percentile Metrics for Microservices

Last updated: November 29, 2026

Quick Overview

LinkedIn runs thousands of microservices. Design a metrics system that collects request latency from every service instance and lets engineers query p50, p99, and p999 per service, endpoint, and data center over arbitrary time ranges, with alerting.

LinkedIn
System Design
Software Engineer
LinkedIn
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


LinkedIn runs thousands of microservices. Design a metrics system that collects request latency from every service instance and lets engineers query p50, p99, and p999 per service, endpoint, and data center over arbitrary time ranges, with alerting.

LinkedIn built its own monitoring stack (inGraphs, and later systems on top of Kafka) because of its huge service fleet. Interviewers check that you know percentiles cannot be averaged, can choose mergeable sketches, and can design the ingest and rollup path for high cardinality.

What the Interviewer Expects
  • Explains why averaging percentiles across hosts is wrong
  • Uses mergeable histograms or sketches
  • Designs client-side aggregation and a Kafka ingest path
  • Stores time series with rollups at multiple resolutions
  • Controls cardinality of tags
  • Supports alerting with low delay
Key Topics to Cover
observability
quantile sketches
time series storage
rollups
cardinality
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Compare HDR histograms, t-digest, and DDSketch for this use.
  • How would you stop a team from adding a user-id tag and exploding cardinality?
  • How do you alert on p99 without flapping?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: every instance reports latency per (service, endpoint, status class, data center); query percentiles over any range from 1 minute to 1 year; dashboards and alerts on thresholds. **Non-...

High-Level Design
  1. A client library in each service records latencies into a local sketch per tag combination and flushes every 10 seconds.
  2. Sketches go to Kafka, partitioned by series key.
  3. Aggregators merge...

Submit Your Answer
Markdown supported