Code Room
System designHardsd-g159
Subject Time series dbLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology

Question

Design the storage engine of a time-series database optimized for IoT telemetry: 10M devices each writing 50 metrics every 10s (~50M points/sec), almost entirely append-only with monotonically increasing timestamps, occasional late/out-of-order arrivals up to 1h late. Reads are 95% 'latest value for device D' and dashboards over the last 24h for a device group; 5% are large aggregations across all devices for a metric over a month. Design the on-disk layout, write path, compaction, and how you avoid write hot partitions.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.