← Amazon Interview Insights

Amazon·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

System design round at Amazon for a software engineer role. The whole thing was one big question about building a temperature sensor platform at massive scale, and it went pretty deep into areas I wasn't fully prepared for.

Questions Asked (1)

Q1

Design a system that ingests data from up to 10 million temperature sensors distributed across a large geographic region, stores it at 10-second granularity, and serves a near-real-time heat map as well as arbitrary time-range queries (current, min, max) for any sensor. The system needs to stay stable for years.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one is deceptively wide.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (10M sensors, 10s granularity, ~1M writes/sec, retention years). Then propose a scalable ingestion pipeline (e.g., Kafka + stream processing) and a storage layer optimized for time-series (e.g., time-partitioned columnar store or TSDB) with pre-aggregation for heat maps. Finally, discuss trade-offs around consistency, cost, and query performance, and how to ensure long-term stability.

Pro tip: Emphasize the need for downsampling and tiered storage to handle years of data cost-effectively, and mention that heat maps can be served from pre-aggregated tiles rather than raw data.

1. Clarify Requirements and Scale

Ask questions to understand data volume, query patterns, latency requirements, and retention. Calculate write throughput (10M sensors / 10s = 1M writes/sec) and storage needs.

2. Design Ingestion Pipeline

Propose a scalable, fault-tolerant ingestion layer using a distributed message queue (e.g., Kafka) and stream processing (e.g., Flink) to validate, transform, and route data.

3. Choose Storage and Data Model

Select a time-series database or a columnar store with time-based partitioning. Model data with sensor ID, timestamp, and value, and consider pre-aggregation for common queries.

4. Serve Queries and Heat Maps

Design query APIs for current, min, max over arbitrary time ranges. For heat maps, pre-compute spatial aggregations (e.g., grid tiles) and serve via a low-latency cache or CDN.

5. Address Long-Term Stability and Trade-offs

Discuss data retention policies, downsampling, tiered storage, and monitoring. Highlight trade-offs between consistency, latency, cost, and complexity.

Key Points to Mention

  • Partitioning strategy: time-based partitioning (e.g., by day) and sensor-based sharding to distribute load.
  • Pre-aggregation: compute min/max/avg per sensor per time window (e.g., 1 minute) to speed up queries and reduce storage.
  • Heat map generation: use spatial indexing (e.g., geohash) and pre-render tiles at different zoom levels, updated periodically.
  • Data retention and downsampling: keep raw data for short term, downsample older data to reduce storage costs while preserving trends.
  • Fault tolerance and scalability: use replication, partitioning, and backpressure in ingestion; ensure idempotent writes.
  • Query optimization: use columnar storage, compression, and caching for time-range queries; consider approximate algorithms for min/max if exactness not required.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.