Stripe System Design Interview: Service Metrics Ingestion and Query
Based on questions reported for Stripe interviews
The interviewer opens
Hi, and thanks for joining. Welcome to your interview for the software engineer role at Stripe. We'll design a system together, and you can sketch on the whiteboard on the right of your screen as you talk. If you need to step out or take a break, the Pause button at the top right will pause the interview.
The problem is about collecting and querying metrics from Stripe's internal services, which matters here because engineers rely on that data to watch the health of payment systems. It's up in the Problem tab, so please read through the requirements and ask me anything you'd like clarified before you start drawing.
The problem
Design a system that collects metric counts emitted by thousands of Stripe's internal services, aggregates them over time and across dimensions, and lets engineers query the aggregated results for dashboards and product questions.
Must do
- Accept count events from many services, each with a metric name, timestamp and a few tags
- Aggregate counts over time windows and by tag values
- Query totals for a metric over a time range, filtered and grouped by tags
- Serve both recent (last hour) and historical (months back) queries
Must hold
- Ingestion must keep up with very high write volume without dropping data
- Dashboard queries must return quickly even over long time ranges