Design a Metrics System

Quick Overview

Design a metrics system with clear measurement semantics, scalable ingestion and queries, controlled label cardinality, retention, and visible failure modes.

Design a Metrics System

Company: Snapchat

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a metrics system. Begin by clarifying what kinds of metrics it serves, who queries them, and the required freshness, retention, scale, and tolerance for missing data. State a concrete baseline before describing your architecture; the source provides no fixed workload or service-level targets. ### What a Strong Answer Covers - A metric data model with time, dimensions, units, and appropriate aggregation semantics. - Collection, ingestion, storage, and query paths connected to the stated use case. - Cardinality, retention, and the cost of both ingestion and broad queries. - Duplicate or late samples, missing data, process resets, and component failures. - A way to operate and monitor the metrics service itself. ### Follow-up Questions - Why is averaging the reported latency percentiles from several servers usually incorrect? - How would an accidental per-request label affect the system, and where would you control it?

Overview: Design a metrics system with clear measurement semantics, scalable ingestion and queries, controlled label cardinality, retention, and visible failure modes.

|Home/System Design/Snapchat
Snapchat logo
Snapchat
Aug 22, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a metrics system. Begin by clarifying what kinds of metrics it serves, who queries them, and the required freshness, retention, scale, and tolerance for missing data. State a concrete baseline before describing your architecture; the source provides no fixed workload or service-level targets.

What a Strong Answer Covers Guidance

  • A metric data model with time, dimensions, units, and appropriate aggregation semantics.
  • Collection, ingestion, storage, and query paths connected to the stated use case.
  • Cardinality, retention, and the cost of both ingestion and broad queries.
  • Duplicate or late samples, missing data, process resets, and component failures.
  • A way to operate and monitor the metrics service itself.

Follow-up Questions Guidance

  • Why is averaging the reported latency percentiles from several servers usually incorrect?
  • How would an accidental per-request label affect the system, and where would you control it?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...