Kabir's first day: 40 tool names and one diagram
Riya's friend Kabir has just joined TiffinGo, a food-delivery startup in Pune, as a data intern. On day one his manager shows him the “data platform” diagram. It has more than forty logos on it. Kabir messages Riya in panic, and she brings him to Arjun Sir.
Sir, Kafka, Flink, Hive, Iceberg, Airflow… it's like a different language. Do I have to learn all of them this week?
No. Here is the secret: almost every tool on that diagram does one of just six jobs. Bring data in, keep it, change it, ask questions of it, show it, and run all of that on a schedule.
Like a restaurant kitchen! Groceries arrive, go in the store-room, get cooked, get served, and the head chef decides the order of work.
Exactly, Riya. And Kabir, when you see a new logo, ask just one question: which of the six jobs does this do? The name changes; the job doesn't.
So Kafka is… the delivery van bringing groceries?
Perfect. Today we'll follow one TiffinGo order through all six jobs, watch the platform at lunch rush and at 2 am, and by the end you'll be able to draw that diagram yourself.
What is the big data ecosystem?
The big data ecosystem is the collection of tools and services that together form a data platform: they ingest data from sources, store it at scale, process it in batch or in real time, make it available for querying and analysis, serve the results to people and applications, and orchestrate, monitor and govern every step. Each tool specialises in one or two of these layers, and a working platform combines several of them into data pipelines.
No single tool does everything. A data platform is a team of tools: one brings data in, one keeps it, one cleans and calculates, one answers questions, one draws the charts, and one acts as the manager who decides what runs when.
Words you'll meet in this lesson
orders or payments.The six layers at a glance
| 1. Ingest | Collect data from apps, databases and devices · Kafka, NiFi, Debezium, Flume, Sqoop (older) |
|---|---|
| 2. Store | Keep data safely at huge scale · HDFS, Amazon S3 / Azure ADLS / Google Cloud Storage, HBase, Cassandra |
| 3. Process | Clean, join, aggregate · Spark, Flink, MapReduce (older), Kafka Streams, dbt |
| 4. Query & analyse | Answer questions with SQL · Hive, Trino/Presto, Spark SQL, Snowflake, BigQuery, Redshift |
| 5. Visualise & serve | Show results to people and apps · Power BI, Tableau, Superset, APIs, ML models |
| 6. Orchestrate & govern | Schedule, monitor, secure, catalogue · Airflow, Oozie (older), YARN/Kubernetes, data catalogs |
The same map at three levels
Beginner The restaurant kitchen
Think of TiffinGo's data platform as a big restaurant kitchen:
- Ingest = the delivery van that brings vegetables every few minutes.
- Store = the store-room and fridge. Everything is kept, even things you might need later.
- Process = the cooks who wash, cut and cook raw vegetables into dishes.
- Query = the order counter, where anyone can ask “how many thalis today?”
- Visualise = the menu board and the plated food: results people can see.
- Orchestrate = the head chef with a timetable: dal must be ready before rice is served.
If you remember the kitchen, you can place any tool. That is all you need for now.
Intermediate What each layer must handle, and how to pick a tool
- Ingest must cope with many sources and bursts. Use Kafka for continuous events (orders, clicks), CDC tools like Debezium to copy database changes, and file or API pulls for daily batches.
- Store must be cheap, huge and safe. Raw files go to HDFS or cloud object storage (S3, ADLS, GCS); fast lookups by key go to NoSQL (HBase, Cassandra).
- Process splits into batch (Spark on yesterday's data) and stream (Flink or Spark Streaming on events as they arrive). That's Lesson 4.2.
- Query gives analysts SQL: Hive/Trino on lake files, or a warehouse like Snowflake or BigQuery for clean tables.
- Orchestrate: Airflow runs the daily DAG: check data arrived → Spark job → load warehouse → refresh dashboard, and retries failures.
Quick rule: “Need it live?” → stream tools. “Need SQL?” → query engine or warehouse. “Need it every night at 2 am?” → orchestrator.
Advanced How real platforms are designed today
- Storage and compute are separated. Data sits in object storage; Spark, Trino or a warehouse start compute only when needed, and scale independently. Old Hadoop clusters tied both to the same machines.
- Open table formats (Apache Iceberg, Delta Lake, Apache Hudi) add database features (transactions, schema changes, time travel) to files in a lake. This is the lakehouse idea, covered in Lesson 4.3.
- Resource managers moved: many teams now run Spark and Flink on Kubernetes instead of Hadoop's YARN. Kafka 4.0 removed its ZooKeeper dependency in favour of its built-in KRaft mode.
- Legacy you will still meet: MapReduce, Sqoop (retired by Apache in 2021), Flume and Oozie appear in exams and older clusters, but are rarely chosen for new projects.
- Managed vs self-hosted: cloud services (EMR, Dataproc, Databricks, BigQuery) trade higher unit prices and some lock-in for far less operations work. The right answer depends on team size, scale and cost.
- Governance is a layer, not an afterthought: a catalog (what data exists), lineage (where it came from), access control and data-quality checks.
Exam tip: Draw the layered architecture: sources → ingestion → storage → processing (batch + stream) → query/analysis → visualisation, with orchestration and governance down the side. Name two tools per layer. This one diagram answers most “explain the Hadoop / big data ecosystem” questions.
Three ways to build the same platform
Classic Hadoop (on-premises)
HDFS for storage, YARN for resources, MapReduce/Hive/Spark for processing, Oozie for scheduling, all on the company's own servers.
2008 → still in banks, telecom, governmentCloud-native, open source
Object storage (S3/ADLS/GCS), Spark or Flink on Kubernetes, Kafka, Trino, Airflow. You run the tools; the cloud provides machines.
FlexibleFully managed cloud
Kinesis or Pub/Sub, a cloud warehouse (BigQuery, Snowflake, Redshift), managed Spark (Databricks, EMR, Dataproc), managed Airflow.
Least ops workOne layer, three names: open source vs the big clouds
| Layer | Open source | AWS | Azure | Google Cloud |
|---|---|---|---|---|
| Ingest (stream) | Kafka | Kinesis, MSK | Event Hubs | Pub/Sub |
| Store (lake) | HDFS | S3 | ADLS Gen2 | Cloud Storage |
| Process | Spark, Flink | EMR, Glue | Databricks, Synapse Spark | Dataproc, Dataflow |
| Query / warehouse | Hive, Trino | Athena, Redshift | Synapse, Fabric | BigQuery |
| Orchestrate | Airflow | MWAA, Step Functions | Data Factory | Cloud Composer |
| Visualise | Superset | QuickSight | Power BI | Looker |
Cloud product names change often; the layers don't. Learn the layer first, then the local name.
Which tool for which question?
| If the question is… | …you're in this layer | Typical tool |
|---|---|---|
| “How do app events reach us within a second?” | Ingest (stream) | Kafka |
| “Where do we keep five years of raw logs cheaply?” | Store | S3 / HDFS |
| “Clean and join 2 TB of orders every night” | Process (batch) | Spark |
| “Alert if a kitchen gets 50 orders in 5 minutes” | Process (stream) | Flink, Spark Streaming |
| “Analysts want SQL on all of it” | Query | Trino, Hive, a warehouse |
| “Run all of the above at 2 am, in order, with retries” | Orchestrate | Airflow |
Kafka is not Airflow. A common beginner mix-up: Kafka moves data continuously; Airflow schedules jobs and moves no data itself. One is the delivery van, the other is the head chef's timetable.
Follow one TiffinGo order through all six layers
Source: the app creates an event
The moment Kabir taps Place order, the app sends this event. At lunch rush thousands of phones send events like this every minute.{"order_id": 90017, "user": "kabir", "kitchen": "K12", "city": "Pune", "item": "veg thali", "amount": 120, "ts": "2026-10-19T12:31:08"}Ingest: Kafka receives it
The event is appended to thekafka-console-producer --topic orders --bootstrap-server broker1:9092orderstopic. Kafka doesn't process it; it keeps events in order, durably, and lets many systems read them: the live dashboard, the fraud checker and the lake loader.Store: raw copy in the lake
A loader writes Kafka events into the lake every few minutes, in folders by date and hour. Raw data is never changed, so it can always be reprocessed if a bug is found later.s3://tiffingo-lake/raw/orders/date=2026-10-19/hour=12/part-0003.jsonProcess: Spark cleans and joins
This is real PySpark (you'll write it in the Spark course). Spark splits the day's files across many executors, removes duplicate events, joins kitchen names and totals sales, exactly the partition → process → combine pattern from Lesson 1.3.orders = spark.read.json("s3://tiffingo-lake/raw/orders/date=2026-10-19/") kitchens = spark.read.parquet("s3://tiffingo-lake/clean/kitchens/") daily = (orders.dropDuplicates(["order_id"]) .join(kitchens, "kitchen") .groupBy("city", "kitchen_name").sum("amount")) daily.write.mode("overwrite").parquet("s3://tiffingo-lake/gold/daily_sales/date=2026-10-19/")Query: SQL on the result
Trino, Hive or a warehouse runs this SQL directly over the Parquet files or loaded tables. Analysts never need to know where the files live.SELECT city, SUM(amount) AS revenue FROM gold.daily_sales WHERE date = '2026-10-19' GROUP BY city ORDER BY revenue DESC;Visualise and orchestrate
The Power BI dashboard refreshes, and the city manager sees yesterday's sales at 6 am.
Behind all of it, an Airflow DAG ran at 2 am: check raw data arrived → run Spark job → check row counts → load warehouse → refresh dashboard. If Spark fails, Airflow retries it and alerts the on-call engineer.
One order: what Kabir sees, and what the platform does
Step through the six frames. Left: Kabir's phone and his manager's dashboard. Right: the layer that is working at that moment.
- Kabir orders a veg thali for ₹120 on the TiffinGo app.
- The order is confirmed in about a second.
- He tracks the rider. Nothing else about data is visible to him.
- At 2 am the city manager's dashboard still shows the day before yesterday.
- By morning the dashboard shows yesterday's sales by city.
- It updated at 05:42, ready for the 6 am meeting, and Kabir's ₹120 is one tiny part of the Pune bar.
- Source: the app turns Kabir's tap into a small JSON event.
- Ingest: the event is appended to Kafka's
orderstopic. The live dashboard, the fraud checker and the lake loader each read it independently. - Store: a loader writes the raw event into the data lake, in a folder for that date and hour.
- Process: at 2 am, Spark executors process all of yesterday's files in parallel: remove duplicates, join kitchen details, total by city.
- Query and visualise: the dashboard runs SQL over the clean table and draws the bars.
- Orchestrate: an Airflow DAG ran every step in order, so the report was ready before 6 am.
The ecosystem in real time: three live scenarios
The same layers behave very differently at lunch rush, at 2 am and when a company moves to the cloud. Watch all three.
Real-time scenario 1Lunch rush: the streaming path saves a kitchen
12:00 to 13:00 on a weekday. Orders flow through Kafka into a stream processor (Flink) that counts orders per kitchen every minute. Watch what happens when one kitchen is overloaded.
- 12:00: every order event flows Kafka → Flink, which keeps a running count of orders per kitchen for the last 5 minutes.
- 12:25: the rush starts and all counts rise. The stream processor updates them continuously.
- 12:41: kitchen K12 crosses its limit. An alert fires within seconds, not the next day.
- Action: the app automatically marks K12 as busy and shows a longer delivery time, so customers spread to other kitchens.
- Result: the rush is absorbed. This is the streaming path of the ecosystem; Lesson 4.2 goes deep into it. (Numbers are illustrative.)
2 am: the orchestrator handles a failure while everyone sleeps
The nightly daily_sales DAG starts at 02:00. Halfway through, a cloud machine running the Spark job disappears. Watch Airflow deal with it.
- 02:00: Airflow starts the DAG. The first task checks that yesterday's raw files have arrived.
- 02:04: the Spark job starts on 40 executors.
- 02:31: the cloud reclaims a machine and the job fails. Airflow marks downstream tasks as waiting, so no half-finished data reaches the dashboard.
- 02:36: Airflow automatically retries after a delay, as configured, and posts an informational alert.
- 05:42: everything succeeds and the dashboard refreshes before the 6 am meeting. Orchestration turns failures into delays instead of disasters.
Moving to the cloud: same layers, new names
TiffinGo's investors want it on the cloud. The team maps every layer of their open-source stack to a managed service. Watch the map change, and notice what stays the same.
- Today: Kafka, HDFS, Spark, Hive and Airflow, run on TiffinGo's own machines.
- AWS: Kinesis, S3, EMR, Athena and MWAA (managed Airflow) do the same jobs, run by Amazon.
- Azure: Event Hubs, ADLS, Databricks, Synapse and Data Factory.
- Google Cloud: Pub/Sub, Cloud Storage, Dataproc, BigQuery and Cloud Composer.
- The insight: every column is one layer. Engineers who know the layers move between clouds easily. (Services shown are typical choices; each cloud offers alternatives.)
Where you'll see the ecosystem at work
1. Food delivery: live ETAs
Rider GPS pings every few seconds go through Kafka to a stream processor that updates arrival times. The same pings are stored in the lake and used overnight to retrain the ETA model.
2. Banking: regulatory reports
Core banking databases are copied nightly with CDC into the lake, Spark builds risk and compliance tables, and orchestrated jobs produce the reports banks must file with regulators on time.
3. Smart electricity meters
Smart meters send readings every 15 minutes. Utilities ingest them as streams, store years of history for billing disputes, and run batch jobs to forecast demand and find power theft patterns.
4. E-commerce search
Every search and click is ingested, stored in the lake, and processed daily to improve search ranking. Analysts query the click tables with SQL to find searches that return nothing useful.
5. Streaming video: what to watch next
Play, pause and skip events feed both a real-time path (what's trending right now) and a batch path (recommendations recomputed nightly), all scheduled and monitored by an orchestrator.
Simplified to show the layers. Real platforms vary by company.
Build a tiny data platform in Python
Each function below plays the role of one layer. ingest accepts every event like Kafka, store keeps raw copies like a data lake, process cleans like Spark, serve answers a question like a SQL engine, and the last three lines are the orchestrator. Notice how the corrupted event and the wrong data type are handled in process, never by changing the raw copy.
import json
raw_events = [
'{"order": 1, "city": "Pune", "item": "thali", "amount": 120}',
'{"order": 2, "city": "Mumbai", "item": "biryani", "amount": 250}',
'{"order": 3, "city": "Pune", "item": "thali", "amount": 120}',
'{"order": 4, "city": "Pune", "item": "dosa", "amount": "90"}',
'CORRUPTED###',
]
def ingest(events): # like Kafka: accept everything, in order
print("INGEST :", len(events), "events received")
return list(events)
def store(events, lake): # like a data lake: keep the raw copy
lake["raw/orders"] = events
print("STORE :", len(events), "raw events saved")
def process(lake): # like Spark: parse, clean, fix types
clean = []
for e in lake["raw/orders"]:
try:
r = json.loads(e)
except json.JSONDecodeError:
continue # skip broken events (real systems log them)
r["amount"] = int(r["amount"])
clean.append(r)
lake["clean/orders"] = clean
print("PROCESS:", len(clean), "clean rows")
def serve(lake): # like Hive / a warehouse: answer a question
by_city = {}
for r in lake["clean/orders"]:
by_city[r["city"]] = by_city.get(r["city"], 0) + r["amount"]
print("SERVE : revenue by city ->", by_city)
# ORCHESTRATE: like Airflow, run each layer in the right order
lake = {}
store(ingest(raw_events), lake)
process(lake)
serve(lake)lake["raw/orders"] = eventsThe raw copy is saved before cleaning. If the cleaning code has a bug, you fix it and reprocess from raw. That is why lakes keep raw data.except json.JSONDecodeError:One broken event must not stop the platform. The processing layer skips it; real pipelines also write it to an error table for checking.r["amount"] = int(r["amount"])Order 4 sent the amount as text"90". Fixing types is a typical processing job.store(ingest(raw_events), lake)The last three lines are the orchestrator: they decide the order. Swapprocessandserveand see what breaks.
One pipeline, one line at a time
A smaller pipeline: three raw events, a process layer and a serve layer. Watch the lake dictionary gain a "clean" copy while "raw" stays untouched, and watch each layer get its own frame on the stack.
Worked examples: real problems, solved and traced in memory
Four problems, from first-week intern to platform architect. Each runs live and is traced line by line.
Sort a stack into layers, and spot the gap
Problem statement
Your team's platform uses Spark, Kafka, Power BI, S3, Airflow and Hive. Print the tools under each of the six layers, and flag any layer with no tool.
stack: Spark, Kafka, Power BI, S3, Airflow, Hive
Ingest ['Kafka'] Store ['S3'] Process ['Spark'] Query ['Hive'] Visualise ['Power BI'] Orchestrate ['Airflow']
Approach
- Keep a lookup table from tool to layer.
- Group the stack into a dictionary of lists with
setdefault. - Print the six layers in order, showing “(missing!)” where a list is empty.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
When does an order appear on each dashboard?
Problem statement
An order can reach a dashboard by two paths. The streaming path: app → Kafka (0.2 s) → Flink (0.5 s) → live dashboard (1 s). The batch path: app → Kafka (0.2 s) → hourly dump to S3 (up to 3,600 s) → nightly Spark job (up to 6 hours) → report (10 minutes). Print the worst-case delay for each.
two lists of (stage, seconds)
Streaming path: 1.7 seconds Batch path : 7.2 hours
Approach
- Write a function that adds up the seconds in a path.
- Call it for both paths.
- Show the result in readable units: seconds and hours.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Work out the run order of a DAG by hand
Problem statement
Four tasks: ingest needs nothing, clean needs ingest, features needs clean, report needs clean. Find an order that respects every dependency, the way an orchestrator does.
needs: clean←ingest, features←clean, report←clean
['ingest', 'clean', 'features', 'report']
Approach
- Repeatedly pick tasks whose requirements are all done.
- Mark them done and add them to the order.
- Stop when every task is done.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Translate an open-source stack to a cloud
Problem statement
TiffinGo will move to one cloud. Given the open-source tool for each layer, print the typical managed service on AWS, Azure or Google Cloud.
stack per layer + chosen cloud
Ingest Kafka -> Pub/Sub Store HDFS -> Cloud Storage Process Spark -> Dataproc Query Hive -> BigQuery Orchestrate Airflow -> Cloud Composer
Approach
- Store one mapping per cloud: layer → service.
- Keep the current stack as layer → open-source tool.
- Print “open-source → managed” for each layer of the chosen cloud.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Check yourself
Quick revision
Lesson 4.1 in one screen
- Six jobs: Ingest → Store → Process → Query → Visualise, with Orchestrate & govern across all of them.
- Ingest: Kafka, NiFi, CDC · Store: HDFS, S3/ADLS/GCS, HBase, Cassandra · Process: Spark, Flink.
- Query: Hive, Trino, Spark SQL, Snowflake, BigQuery · Visualise: Power BI, Tableau · Orchestrate: Airflow.
- Kafka moves data; Airflow schedules jobs. Don't mix them up.
- Keep the raw copy; clean in the processing layer; reprocess from raw when logic changes.
- Cloud names differ, layers don't: Kinesis/Event Hubs/Pub/Sub are all “ingest”.
- Advanced: storage–compute separation, open table formats (lakehouse), Kubernetes, governance and lineage.
Interview and viva questions
Explain the Hadoop / big data ecosystem.
A big data platform is built in layers. Ingestion tools (Kafka, Flume, Sqoop, NiFi) bring data in; storage (HDFS, HBase, cloud object storage) keeps it; processing engines (MapReduce, Spark, Flink) transform it in batch or streaming mode; query tools (Hive, Pig historically, Trino) give SQL access; visualisation tools present it; and coordination and scheduling (YARN, ZooKeeper, Oozie/Airflow) manage resources and workflows. Each tool specialises in one layer and they are combined into pipelines.
What is the difference between Kafka and Airflow?
Kafka is a distributed, durable event log: it moves streams of events continuously from producers to consumers. Airflow is a workflow orchestrator: it schedules and monitors batch tasks (like a Spark job) in dependency order. Kafka carries data; Airflow carries none, it only tells other tools when to run.
What is a data pipeline?
A sequence of steps that moves data from sources to a useful destination: extract or ingest, store, transform (clean, join, aggregate) and load into a place where it is queried or served. Pipelines can be batch (scheduled) or streaming (continuous).
Why do companies use managed cloud services instead of running Hadoop themselves?
Managed services remove the work of installing, patching, scaling and monitoring clusters, let compute scale up and down with demand, and separate storage from compute. The trade-offs are cost at large steady scale, less control, and some dependence on one provider.
What is the role of orchestration and governance in the ecosystem?
Orchestration schedules pipelines, runs tasks in the right order, retries failures and alerts people. Governance makes data trustworthy and safe: catalogues of what data exists, lineage of where it came from, access control, and data-quality checks.
Practice problems
From reading a platform diagram to reasoning like an architect. Problems are marked Easy, Medium, Advanced and Business.
Count tools per layer
Count how many tools in the list belong to each layer.
Kafka:Ingest, NiFi:Ingest, S3:Store, Spark:Process, Flink:Process, Hive:Query
{'Ingest': 2, 'Store': 1, 'Process': 2, 'Query': 1}Show solution and explanation
tools = [("Kafka", "Ingest"), ("NiFi", "Ingest"), ("S3", "Store"),
("Spark", "Process"), ("Flink", "Process"), ("Hive", "Query")]
count = {}
for name, layer in tools:
count[layer] = count.get(layer, 0) + 1
print(count)How it works: A dictionary counter: the most-used pattern in data engineering code.
Total pipeline delay
Stages take 2, 45, 300 and 30 seconds. Print the total delay in minutes.
[2, 45, 300, 30]
6.3 minutes
Show solution and explanation
print(round(sum([2, 45, 300, 30]) / 60, 1), "minutes")How it works: 377 seconds ≈ 6.3 minutes from source to dashboard.
Which layers are missing?
A startup has tools for Ingest, Store and Visualise only. Print the missing layers.
have: Ingest, Store, Visualise
['Orchestrate', 'Process', 'Query']
Show solution and explanation
all_layers = {"Ingest", "Store", "Process", "Query", "Visualise", "Orchestrate"}
have = {"Ingest", "Store", "Visualise"}
print(sorted(all_layers - have))How it works: Set difference gives what is in the first set but not the second.
Find the bottleneck stage
Given stage durations, print the slowest stage and its share of the total time.
ingest 5, store 20, spark 900, load 60, refresh 15 (seconds)
spark takes 90 % of the time
Show solution and explanation
stages = {"ingest": 5, "store": 20, "spark": 900, "load": 60, "refresh": 15}
slowest = max(stages, key=stages.get)
share = stages[slowest] / sum(stages.values()) * 100
print(slowest, "takes", round(share), "% of the time")How it works: Speed up the bottleneck first; improving a 5-second stage changes almost nothing.
Raw vs Parquet size
The lake receives 500 GB of raw JSON a day. Converted to compressed Parquet it is about one fifth of the size. Print the yearly size of each in TB.
500 GB/day, ratio 1/5
Raw JSON : 178.2 TB per year Parquet : 35.6 TB per year
Show solution and explanation
raw_tb = 500 * 365 / 1024
print("Raw JSON :", round(raw_tb, 1), "TB per year")
print("Parquet :", round(raw_tb / 5, 1), "TB per year")How it works: Columnar, compressed formats are why the processing layer rewrites raw data. More in Lesson 4.3.
What must be skipped after a failure?
Given which tasks depend on which, print every task that cannot run because clean failed (all tasks downstream of it).
clean→features, clean→report, features→model, report→email
Skipped: ['features', 'report', 'model', 'email']
Show solution and explanation
downstream = {"clean": ["features", "report"], "features": ["model"],
"report": ["email"], "model": [], "email": []}
to_skip, queue = [], ["clean"]
while queue:
task = queue.pop(0)
for nxt in downstream[task]:
if nxt not in to_skip:
to_skip.append(nxt)
queue.append(nxt)
print("Skipped:", to_skip)How it works: A breadth-first walk over the DAG: exactly how an orchestrator marks tasks as upstream_failed.
Hot and cold storage tiers
Data is kept 30 days in fast “hot” storage (Rs 2 per GB-month) and then moved to “cold” archive (Rs 0.3 per GB-month) for 1 year. With 100 GB arriving per day, print the monthly cost once the system is full (illustrative prices).
100 GB/day, hot 30 days, cold 365 days
Hot : 3000 GB Cold: 36500 GB Monthly cost: Rs 16950
Show solution and explanation
hot_gb = 100 * 30
cold_gb = 100 * 365
cost = hot_gb * 2 + cold_gb * 0.3
print("Hot :", hot_gb, "GB")
print("Cold:", cold_gb, "GB")
print("Monthly cost: Rs", round(cost))How it works: Most data is cold. Tiering is a standard storage-layer design decision.
Is the dashboard fresh?
Each dashboard must be updated within its freshness limit (hours). Print which ones are stale.
sales: 5h old, limit 24 · fraud: 2h old, limit 1 · stock: 30h old, limit 24
sales OK fraud STALE stock STALE
Show solution and explanation
dashboards = {"sales": (5, 24), "fraud": (2, 1), "stock": (30, 24)}
for name, (age, limit) in dashboards.items():
print(f"{name:6}", "OK" if age <= limit else "STALE")How it works: Freshness checks are a governance task: someone must notice before the business does.
Managed or self-hosted?
Self-hosting needs 2 engineers at Rs 1.5 lakh/month each plus Rs 1 lakh of servers. A managed service costs Rs 3.2 lakh/month and needs 0.5 engineer. Print both monthly costs (illustrative).
as given
Self-hosted: Rs 4.0 lakh Managed : Rs 3.95 lakh
Show solution and explanation
self_hosted = 2 * 1.5 + 1.0
managed = 3.2 + 0.5 * 1.5
print("Self-hosted: Rs", self_hosted, "lakh")
print("Managed : Rs", managed, "lakh")How it works: People cost often outweighs machine cost. That is why many teams choose managed services despite higher unit prices.
Real-world scenario questions (asked in company interviews)
Questions that test whether you understand the ecosystem, not just its names. Decide your answer first, then open the model answer.
“Walk me through our platform diagram”
In your first week, your lead points at a diagram with 25 logos and asks you to explain how data flows from the mobile app to the CEO's dashboard.
The interviewer is checking: can you organise tools by job and tell a clear story, instead of listing names?
Show a strong answer
Follow one record through the layers, naming the tool at each step:
- Source → ingest: the app sends events to Kafka.
- Store: a loader writes raw events into the lake (S3/HDFS), partitioned by date.
- Process: Spark cleans, de-duplicates and joins them nightly; Flink handles the live path.
- Query: results land in warehouse tables; analysts use SQL.
- Visualise: the BI dashboard reads those tables.
- Orchestrate and govern: Airflow schedules the nightly steps; the catalog documents the tables.
Avoid: reading the logos left to right without saying what each one does.
“Can't we just use Kafka to schedule our nightly jobs?”
A product manager notices Kafka is already installed and asks why the team also needs Airflow.
The interviewer is checking: do you know the difference between moving data and orchestrating work?
Show a strong answer
Kafka moves events continuously from producers to consumers; it has no idea of “run the Spark job at 2 am, then load the warehouse, retry three times if it fails”. Airflow does exactly that: schedules, dependencies, retries, alerts and a history of every run. They solve different problems and are commonly used together.
Avoid: claiming one tool can replace every layer.
At 11 am the dashboard still shows the day before yesterday
The sales head complains the dashboard is a day behind. Nobody received an alert. Where do you look, and in what order?
The interviewer is checking: can you debug a pipeline layer by layer, starting from the orchestrator?
Show a strong answer
- Orchestrator first: did last night's DAG run? Which task failed or is still running? Why was no alert sent?
- Ingestion: did yesterday's raw files arrive in the lake (count, size, partition)? Is the Kafka loader lagging?
- Processing: did the Spark job fail, or succeed with zero rows?
- Load and serve: was the warehouse table updated? Did the dashboard refresh, or is it cached?
- Fix, re-run from the failed task, then fix the missing alert and add a freshness check.
Avoid: re-running the whole pipeline blindly before knowing which layer broke.
Moving an on-premises Hadoop cluster to the cloud
A telecom company runs a 200-node Hadoop cluster (HDFS, YARN, Hive, Spark, Oozie). Leadership wants to move to the cloud. What maps to what, and what really changes?
The interviewer is checking: do you understand the architectural shift, not only the product names?
Show a strong answer
- Mapping: HDFS → object storage; YARN → managed Spark or Kubernetes; Hive tables → a catalog over the lake or a cloud warehouse; Oozie → Airflow (managed).
- Real change: storage and compute separate. Clusters become temporary: start for a job, shut down after. Cost moves from fixed hardware to pay-per-use, so idle clusters and inefficient queries now cost real money.
- Plan: migrate data in waves, run old and new in parallel and compare outputs, convert to columnar formats, set up access control and cost monitoring from day one.
Avoid: “lift and shift” of the same always-on 200 nodes into cloud VMs, which usually costs more and gains little.