HLDArena
HLD-106·Messaging & Queues
Easy · 500 pts

IoT Smart-Meter Telemetry Ingestion Pipeline

Design a write-heavy IoT ingestion backend collecting synchronized smart-meter readings and serving latest device health queries.

Max p99
≤ 80 ms
Availability
≥ 99.4%
Budget
≤ $2,250

Functional Requirements

  • FR-1POST /v1/telemetry — Ingests batched sensor readings keyed by device_id.
  • FR-2GET /v1/devices/{device_id}/latest — Returns most recent meter reading and battery state.
  • FR-3DELETE /v1/telemetry/{device_id} — Supports tenant retention TTL expiry, rule updates, or stream cleanup while keeping recent rollup caches fresh.
  • FR-4Must buffer synchronized top-of-hour device flushes and survive a primary DB crash.

Workload Profile

Baseline Load6,000 Read RPS / 11,000 Telemetry Write RPS
Hourly Flush Peak14,000 Read RPS / 30,000 Write RPS
Active Working Set10 GB latest device shadow state
Traffic DistributionWrite-dominant burst across regional device_id fleets

Consistency Model

Eventual dashboard visibility (< 5s ingestion lag) acceptable; accepted telemetry batches must not be dropped.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
600 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 160 ms
• Availability: ≥ 99.4%
Valid end-to-end Client → Compute → Storage topology