← Amazon Interview Insights

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

Senior
Apr 2026

Summary

System design round at Amazon for a data engineering role. One question, pretty open-ended, and I spent way too long on the ingestion layer before they nudged me toward the dashboard side of things.

Questions Asked (1)

Q1

Design a data pipeline that refreshes every hour and feeds a dashboard displaying the most frequent Alexa user requests, segmented by country.

System DesignData ModelingTechnical Trade-offs
Author's notes

I jumped straight into talking about Kafka and streaming before realizing they said hourly, not real-time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, data sources, dashboard refresh) and then propose a high-level architecture with ingestion, processing, storage, and serving layers. Focus on how to compute top-K frequent requests per country in a scalable, cost-effective way, and discuss trade-offs between batch and stream processing.

Pro tip: Emphasize that the dashboard only needs approximate top-K results, so you can use probabilistic data structures like Count-Min Sketch to reduce memory and cost, and mention that you'd validate accuracy against exact counts periodically.

1. Clarify Requirements and Constraints

Ask about data volume, number of countries, latency tolerance, and whether the dashboard needs exact or approximate counts. Also confirm the definition of 'frequent' (e.g., top 10 per country).

2. Design Data Ingestion

Propose ingesting raw Alexa request logs from a scalable source like Kinesis or Kafka, ensuring partitioning by country for parallel processing. Mention handling late data and duplicates.

3. Choose Processing Strategy

Decide between batch (e.g., hourly Spark job) and stream (e.g., Flink with tumbling windows) processing. For hourly refresh, a micro-batch approach with windowing is suitable; discuss trade-offs.

4. Compute Top-K per Country

Use a distributed aggregation to count requests per country and request type, then select top-K. Consider using Count-Min Sketch for memory efficiency or exact counts if scale permits.

5. Store and Serve Results

Write aggregated top-K results to a low-latency store like DynamoDB or Redis, and expose via an API for the dashboard. Ensure the dashboard can query the latest snapshot.

Key Points to Mention

  • Partitioning by country to enable parallel processing and avoid hotspots.
  • Using windowing (e.g., 1-hour tumbling windows) to align with refresh rate.
  • Trade-offs between exact counting (e.g., using HashMap) and approximate counting (e.g., Count-Min Sketch) for scalability.
  • Handling late-arriving data with watermarks or allowed lateness.
  • Cost and operational complexity of batch vs. stream processing.
  • Data modeling: storing top-K results as key-value pairs (country -> list of top requests) for fast dashboard queries.

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