SevyDevy

Design real-time temperature collection at scale

PremiumIoT systemMedium

  • MQTT
  • mTLS
  • Event time

Quick answer

This ioT system interview question asks you to design real-time temperature collection at scale. Aim for a design that collects data from many devices and acts on it reliably, then explain device connections, ingestion, storage and trade-offs. Interviewers want to see how you handle unreliable networks, device scale and data volume.

The problem

Design a real-time temperature collection system at scale: 2 million sensors across a continent send readings to a backend that shows a live heatmap of the latest temperatures and answers historical queries. The hard parts are bursty, duplicated and late data, and keeping both the live view and the history correct.

Sensors sit on rooftops, in warehouses and at roadside posts, connected over cellular or Wi-Fi. Each one measures every 60 seconds, buffers up to 24 hours of readings while offline and sends them when it reconnects. A sensor can be recalibrated, which corrects its past readings over a time range.

What must the system do?

  • Live heatmap: Show the latest temperature per map cell for the whole continent, updated within 60 seconds of a reading.
  • Historical queries: Return one sensor's or one region's temperatures for any time range, raw for 30 days and as rollups after that.
4 more requirementsUnlock to see all

How well must it do it?

  • Exactly-once effect: A reading sent twice is stored once; retries and reconnect floods never double-count in rollups.
  • Security: Only registered sensors can send data, each with its own credential, and a stolen credential can be revoked within 5 minutes.
3 more requirementsUnlock to see all

What scale should you design for?

Use these numbers in your estimates.

The scale numbers unlock with this questionUnlock

Key concepts

  • MQTT
  • mTLS
  • Event time
  • Idempotent ingestion
  • Time series downsampling
  • Latest state view

How you’ll practise

6 short steps · save and come back any time
  1. Requirements
  2. Estimate
  3. Device and connectivity
  4. Ingestion and processing
  5. Device management and updates
  6. Wrap-up

Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.

What do interviewers look for?

In any IoT system design round.

  • Clarifies device count, message rate and payload size
  • Handles devices that go offline and reconnect
  • Plans ingestion that absorbs bursts
  • Separates hot real-time data from long-term storage
  • Covers device identity, updates and security
  • Explains what runs on the device and what runs in the cloud

Questions people ask about this interview question

Which design type is this question?
It is an ioT system question. You design real-time temperature collection at scale and explain your choices the way you would in an interview.
Is this question asked at entry level?
It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
What should I cover first?
Start with the devices, what they send, how often and what must happen with it. Agree on scope with the interviewer before you design anything.
Can I practise it for free?
It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.

Related questions

Updated · Written by the SevyDevy team

Premium questionSign up free, then unlock it