Design a Smart Meter Electricity Monitoring System
Ingest household electricity readings, expose current and historical usage, and recover safely from offline meter backlogs.
Problem statement
Design a system that collects electricity-consumption readings from smart meters installed in individual households and displays usage on a dashboard.
FastPrep exercise assumptions: each enrolled meter sends an interval reading with a monotonic sequence number; households can view current usage and historical aggregates; meters may disconnect and later upload buffered readings.
Assume 10 million enrolled meters report every 15 minutes, durably accepted readings should appear on the household dashboard within 60 seconds at p99, a meter buffers at most 24 hours, and raw readings are retained for 13 months with hourly aggregates retained for seven years.
Utility billing, dynamic pricing, remote power disconnection, hardware firmware, and grid-control algorithms are outside scope.
What to build
- Enroll a meter into one household with a unique authenticated device identity.
- Accept bounded retry-safe electricity readings and preserve current plus historical views.
- Expose authorized current usage, time-range history, and hourly aggregates with freshness metadata.
- Represent stale meters and reconcile buffered, duplicate, late, or gapped readings after reconnect.
At scale
- For this exercise, assume 10 million meters report one reading every 15 minutes, or about 11,111 readings per second at steady state.
- For this exercise, assume a meter may reconnect with up to 24 hours of buffered readings and replay admission must not starve live traffic.
- For this exercise, retain raw readings for 13 months and hourly aggregates for seven years.