KatInterview

Layering a Big-Data Analytics Stack: Lake, Engine, and Serving Tier

System DesignModel answer
MediumModel answerSystem Designdata-warehousehadoopspark

Last updated

Decide how to combine HDFS, Spark, Hive and SQL Server into a pipeline for 500 TB of logs, analyst SQL, fast executive dashboards and strict governance, and justify what to leave out.

Scenario

A fast-growing company is building a new analytics platform and you are asked to recommend the technology stack. The platform must satisfy four needs:

  1. Hold roughly 500 TB of semi-structured log data, refreshed by periodic batch ETL jobs.
  2. Let analysts run ad-hoc SQL over structured, cleaned data.
  3. Power low-latency dashboards for executive reporting.
  4. Enforce strict governance, including schema enforcement.

Candidate technologies

  • Apache Hive
  • Apache Spark
  • Hadoop (HDFS)
  • Microsoft SQL Server

What to deliver

  • Compare the four technologies, saying which layer each one belongs to (storage, compute, serving) and where each is strong or weak for the needs above.
  • Propose an end-to-end pipeline that combines them.
  • Explain which tools you would deliberately keep out of particular layers, and why.
  • State your assumptions about scale, users and freshness, and mention the main trade-offs and risks of your design.

Aim for a structured answer of the kind you would give in a screening conversation: clear and layered, with a few concrete numbers.

Hints

Hint 1

Start by labelling each tool with the layer it really occupies. One of them is purely storage, one is purely a compute engine, one is a SQL layer plus a metadata catalog, and one bundles everything together.

Hint 2

No single listed tool can handle both 500 TB of raw logs and sub-second dashboards for many concurrent users. Think about a pipeline with a heavy lake tier and a small, pre-aggregated serving tier.

Hint 3

Back up your choices with numbers: replication overhead, columnar compression ratio, daily ingest volume, and the size of a dashboard mart compared with the raw data. Then say where schema is enforced (on read vs on write).