Design a real-time temperature monitoring system
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Amazon's technical phone screen, last asked Jan 2026. It tests iot, time series and alerting.
Design a system that collects temperature readings from millions of sensors every few seconds, shows live and historical temperatures, and alerts when a sensor goes out of its allowed range or stops reporting.
Requirements
- Functional: register sensors with their location and allowed range; ingest readings; show current temperature per sensor and per site; charts over hours, days and months; alert on out-of-range values and on silent sensors; acknowledge and resolve alerts.
- Non-functional: millions of sensors, each reporting every few seconds; alerts within seconds; months of history at low cost; tolerate sensors with flaky connectivity and network outages at sites.
Clarifying questions
- How do sensors connect: directly over the internet, or through a gateway at each site?
- What counts as a real alarm: one bad reading, or a value out of range for some time?
- How long must raw readings be kept?
- Who looks at the data, and how many dashboards are open at once?
- Do sensors send readings in order, and can they buffer while offline?
What a strong answer covers
- An ingestion path: device protocol (for example MQTT) to gateways, a partitioned stream keyed by sensor, and validation of units and timestamps.
- A stream processor that keeps the last value per sensor and evaluates rules, including "no reading for N seconds" with timers, and avoids flapping with hysteresis or a minimum duration.
- Storage: a time-series store for raw readings with rollups for long ranges; current values in a fast key-value store for dashboards.
- Alert management: deduplication, routing to the right people, acknowledgement and escalation.
- Handling late and out-of-order readings after an outage, and sensors that send garbage.
- Scaling by sensor partition, and backpressure when a site floods the system after reconnecting.
Follow-ups
- A whole site loses connectivity for an hour. What alerts fire, and what happens when it reconnects?
- Thresholds vary by time of day or by what is stored in a room.
- Detect a sensor that is drifting slowly rather than failing outright.
- Show a live map of a large warehouse with thousands of sensors.
Where it's asked
- Amazon · Technical phone screen · Last asked Jan 202660 min · Live coding in a shared editor that does not run code, plus Leadership Principles questions · No AI
What it tests
iot · time series · alerting
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
