A ₹50 lakh surprise
TiffinGo has no data centre at all: everything runs on a public cloud. In his second month Kabir builds a small analytics setup in a weekend: files in object storage, a serverless SQL engine on top, and a Spark cluster for the nightly job. The analysts love it. Then the October bill arrives: ₹50 lakh, mostly from one line, “SQL scans”.
Sir, it took me two days to build what used to take a team months. How did it also cost ₹50 lakh?
Because in the cloud you pay for what you use, and serverless SQL charges for every terabyte a query reads. Analysts ran SELECT * on 40 TB of uncompressed CSV, hundreds of times a day. The cluster also ran all night and all day, though the job needs three hours.
So the cloud is expensive?
No, Riya. The cloud is honest: it bills exactly what you do. With good file layouts, clusters that switch off and cheaper spare capacity, the same platform cost ₹2.4 lakh a month.
And all those service names, S3, EMR, Glue, BigQuery, Databricks? It feels like learning three languages.
It’s mostly one language with three accents. Every cloud has object storage, managed Spark, a warehouse, a streaming service and an orchestrator. Today you’ll learn the map once, then see a bill shrink, a spot instance disappear mid-job, and why payment data must stay in Indian regions.
Big data on the cloud
Cloud computing provides on-demand access to computing resources (storage, compute, networking and managed software services) over the internet, billed by usage. For big data, public clouds such as Amazon Web Services (AWS), Microsoft Azure and Google Cloud Platform (GCP) offer managed object storage, distributed processing, data warehouses, streaming and orchestration services that scale elastically. Service models range from IaaS (virtual machines you manage) through PaaS / managed services to serverless offerings billed per query or job, with storage and compute typically separated.
Instead of buying and running your own servers, you rent storage and processing from a cloud company and pay only for what you use. Each cloud offers ready-made services for storing lake data, running Spark, querying with SQL and handling streams, so a small team can build a big data platform in days.
Words you’ll meet in this lesson
India regions (2026)
| AWS | Asia Pacific (Mumbai) and Asia Pacific (Hyderabad) |
|---|---|
| Microsoft Azure | Central India (Pune), South India (Chennai), West India (Mumbai) and additional regions with partners |
| Google Cloud | asia-south1 (Mumbai) and asia-south2 (Delhi) |
Region lists and service names change. Always check the provider’s current documentation before designing.
Big data on the cloud at three levels
Beginner Renting instead of buying
- Buying servers is like buying a car: big cost up front, it sits idle most of the day, and you maintain it.
- The cloud is like a ride-hailing app: book exactly the size you need, for as long as you need, and pay per use. Need 200 cars for one hour? Possible.
- Managed services mean someone else runs the engine: you get storage, Spark, SQL and Kafka-like streaming as ready services, not machines to install.
- Regions are the cities where the cloud has data centres. Indian companies usually choose Mumbai, Hyderabad, Pune, Chennai or Delhi regions.
Intermediate The same building blocks on every cloud
- Storage: object storage is the foundation of every cloud lake (S3, ADLS Gen2, Cloud Storage).
- Processing: managed Spark (EMR, Databricks, Dataproc), serverless ETL (Glue), or Apache Beam pipelines (Dataflow).
- SQL: warehouses (Redshift, Synapse/Fabric, BigQuery, Snowflake) and serverless SQL directly over lake files (Athena, BigQuery external tables).
- Streaming: managed event streams (Kinesis, MSK, Event Hubs, Pub/Sub, Confluent Cloud).
- Orchestration and governance: managed Airflow (MWAA, Cloud Composer), Data Factory, Step Functions; catalogs (Glue Data Catalog, Unity Catalog, Purview, Dataplex).
- Provisioned vs serverless: provisioned means you choose and pay for machines by the hour; serverless means you just submit work and pay per query, job or data processed.
Advanced Cost, lock-in, security and data residency
- The four meters: storage (per GB-month), compute (per node-hour or per TB scanned), requests (per thousand API calls) and egress (data leaving a region or cloud, often the hidden cost).
- FinOps habits: tag every resource with an owner, set budgets and alerts, partition and use columnar formats, auto-terminate idle clusters, autoscale, and use spot / preemptible capacity (much cheaper, but the cloud can take it back at short notice) for fault-tolerant work.
- Lock-in: proprietary services are convenient but hard to leave. Open formats (Parquet, Delta Lake, Iceberg) and open engines (Spark, Kafka APIs, Airflow) keep options open.
- Shared responsibility: the provider secures the data centres and services; you secure your data: least-privilege IAM roles, encryption, private network endpoints, no public buckets.
- Data residency: Indian rules (for example the RBI’s 2018 requirement to store payment-system data in India) and company policies decide which regions data may live in; disaster recovery is often set up across two Indian regions.
Exam tip: Explain the advantages of cloud for big data (elasticity, pay-per-use, managed services, separation of storage and compute, global reach) and the concerns (cost control, lock-in, security, data residency). Add a mapping table of equivalent services on AWS, Azure and GCP for storage, processing, warehouse and streaming.
Service models and the AWS, Azure and GCP map
IaaS: virtual machines
You rent VMs and install Hadoop, Spark or Kafka yourself. Most control, most work. Used for special needs or lift-and-shift migrations.
You run itManaged platforms (PaaS)
Managed Spark clusters, managed Kafka, managed Airflow. You choose sizes; the provider runs the software.
They run itServerless
Submit SQL or a job; capacity appears and disappears automatically. Billed per TB scanned, per job or per second of use.
No serversSaaS data platforms
Snowflake, Databricks, Confluent Cloud: run on any major cloud, billed by usage, with their own consoles.
Multi-cloudThe same job, three clouds
| Job | AWS | Microsoft Azure | Google Cloud |
|---|---|---|---|
| Lake storage | Amazon S3 | ADLS Gen2 / Blob Storage (OneLake in Fabric) | Cloud Storage |
| Managed Spark / Hadoop | Amazon EMR, AWS Glue (Spark) | Azure Databricks, Fabric Spark, HDInsight | Dataproc |
| Data warehouse | Amazon Redshift | Synapse Analytics / Fabric Warehouse | BigQuery |
| SQL directly on lake files | Amazon Athena | Synapse serverless SQL / Fabric | BigQuery external & BigLake tables |
| Event streaming | Kinesis, Amazon MSK (Kafka) | Event Hubs (Kafka-compatible) | Pub/Sub, Managed Kafka |
| Stream processing | Managed Service for Apache Flink, Glue streaming | Stream Analytics, Databricks | Dataflow (Apache Beam) |
| Orchestration | MWAA (Airflow), Step Functions | Data Factory, Fabric pipelines | Cloud Composer (Airflow), Workflows |
| Catalog / governance | Glue Data Catalog, Lake Formation | Microsoft Purview, Unity Catalog | Dataplex, Data Catalog |
| Machine learning | SageMaker | Azure Machine Learning | Vertex AI |
Databricks, Snowflake and Confluent run on all three clouds. Names are as of 2026 and may change.
Learn the categories, not the brand names. If you know “object storage + managed Spark + warehouse + streaming + orchestrator + catalog” and how they connect, you can work on any cloud after a week of reading its documentation.
Building a small cloud data platform
Pick a region and create the lake bucket
Kabir creates a bucket in the Mumbai region with folders by zone:
The region decides latency, price and legal residency. Security settings are your job under the shared-responsibility model.bronze/,silver/,gold/, versioning on, encryption on, public access blocked.Stream app events into the lake
App events flow into a managed stream (Kinesis, MSK, Event Hubs or Pub/Sub) and a delivery service writes them to
No Kafka brokers to patch. The trade-off: you pay per shard, partition or GB, and you accept the provider’s limits.bronze/every few minutes as compressed files.Catalog the tables
A crawler or a table format registers the files as tables (schema, partitions, location) in a catalog so SQL engines and Spark can find them by name.
The catalog is what turns a bucket of files into a lake people can query, and where access permissions are managed.Transform with managed Spark
A managed Spark cluster (EMR, Databricks, Dataproc) or a serverless Spark job builds silver and gold tables. Starting it only for the job instead of leaving it on is the easiest big saving.nodes, rate = 20, 40 # node-hours at illustrative Rs 40 print("always on :", nodes * 24 * 30 * rate, "rupees/month") print("3 h a day :", nodes * 3 * 30 * rate, "rupees/month")always on : 576000 rupees/month 3 h a day : 72000 rupees/monthQuery with serverless SQL, carefully
Per-TB-scanned engines reward Parquet, partitions and selecting only needed columns. The same question can cost a hundred times less with a good layout.lake_tb, scan_fraction = 40, 0.01 price_per_tb = 450 # illustrative rupees per TB scanned print("SELECT * (whole table):", lake_tb * price_per_tb, "rupees per query") print("one day, 2 columns :", lake_tb * scan_fraction * price_per_tb, "rupees per query")SELECT * (whole table): 18000 rupees per query one day, 2 columns : 180.0 rupees per queryWatch the bill like a metric
Every resource is tagged with a team and project; a budget alert fires at 80% of the monthly limit; a weekly report shows the most expensive queries and idle resources.
In the cloud, cost is an engineering metric, just like latency and errors. Teams that watch it daily rarely get bill shocks.
One serverless query: what Kabir sees, and what the cloud does
Step through the six frames. Left: Kabir running a query. Right: how a serverless engine plans, scales out, bills and disappears.
- Kabir writes a query for yesterday’s revenue by city and presses Run.
- It is queued for about a second.
- Running for a few seconds.
- Four result rows appear after 9 seconds.
- Under the result: 14 GB scanned, cost about ₹6.
- Afterwards the workspace is idle, and nothing is being billed for compute.
- There is no cluster waiting: the serverless SQL service receives the query text.
- The planner reads the catalog and finds that only one date partition can match.
- The service starts about 200 workers for a few seconds; each reads part of the Parquet files from object storage, only the two needed columns.
- Partial results are combined into four rows.
- The bill is based on bytes scanned: 14 GB at an illustrative ₹450 per TB is about ₹6.
- Workers are released immediately. Only the stored data keeps costing money, which is the separation of storage and compute in action. (Numbers are illustrative.)
Real-time scenarios: cost, capacity and compliance
Three live scenarios: a monthly bill cut by 95% (real numbers from the program below), a spot worker reclaimed mid-job, and an advanced look at data residency, disaster recovery, egress and lock-in.
Real-time scenario 1From ₹50 lakh to ₹2.4 lakh a month
These figures come from the program in “Run it on your PC” below, with illustrative prices. Watch each fix shrink TiffinGo’s monthly bill.
- The first version stores CSV, lets analysts run
SELECT *hundreds of times a day on a pay-per-scan engine, and keeps a 20-node cluster running all day. Scans alone cost ₹43 lakh. - Rewriting to Parquet, partitioning by date and selecting only needed columns cuts the data each query reads by 40 times. The bill falls to ₹8.3 lakh.
- The Spark cluster is started only for the 3-hour nightly job and terminated afterwards: ₹3.3 lakh.
- Workers run on spot capacity, which is much cheaper; if the cloud reclaims a node, Spark simply re-runs its tasks: ₹2.8 lakh.
- A daily copy of data to another region is stopped, removing egress charges: ₹2.4 lakh, a 95% saving with the same results. (Prices are illustrative, not a real price list.)
A spot worker disappears in the middle of the job
Spot (or preemptible) machines are spare cloud capacity at a deep discount, with one catch: the provider can take them back at short notice. Watch why they suit Spark batch jobs.
- The nightly job runs with the driver on a normal on-demand machine and eight workers on spot capacity.
- The cloud needs its capacity back. Worker 3 gets a short warning (typically a couple of minutes or less) and is taken away.
- Spark detects the lost executor and re-runs the tasks that worker was handling on the remaining workers, recomputing any lost data from its lineage.
- The cluster manager asks for a replacement node, often trying a different machine type or zone.
- The job finishes a few minutes late but costs far less. Rule of thumb: spot for stateless, retryable work (Spark workers, batch); on-demand for drivers, databases and anything that can’t be interrupted.
Where may the data live? Residency, DR, egress and lock-in
Choosing a cloud region is not only about price and speed. Watch four decisions an Indian fintech data team must get right before writing any pipeline.
- Someone proposes moving the payments lake to a cheaper foreign region. For payment-system data this is not allowed: the RBI’s 2018 direction requires it to be stored only in India. Regions are a compliance decision.
- Disaster recovery is therefore set up across two Indian regions, for example Mumbai and Hyderabad, with asynchronous replication and a rehearsed switch-over.
- Data leaving a region or cloud is charged per GB (egress). A daily full copy of 60 TB elsewhere is expensive; copy incrementally and only what is needed.
- To avoid being locked in, keep the data in open formats (Parquet with Delta Lake or Iceberg) and prefer open engines and APIs, even when using managed services.
- Security is shared: the provider protects the infrastructure, while the team must block public access, encrypt data, use least-privilege roles and private endpoints, and keep audit logs.
How Indian companies use the cloud for data
1. Start-ups: cloud-native from day one
Food, travel, ed-tech and fintech start-ups build lakes on object storage with managed Spark or a SaaS platform, a cloud warehouse for BI and managed Kafka, without owning a single server.
2. Banks and insurers: hybrid
Regulated companies often keep core systems on premises and use cloud regions in India for analytics, ML and customer apps, with strict controls on what data moves where.
3. FinOps teams
Larger companies run FinOps practices: tagging, monthly cost reviews per team, rightsizing, spot usage targets and alerts on expensive queries, because cloud spend can rival salaries.
4. Hadoop to cloud migrations
Many enterprises are moving older on-premises Hadoop clusters to cloud lakehouses: data copied to object storage, Hive tables converted to Delta or Iceberg, jobs moved to managed Spark.
Translate a design between clouds
A small dictionary maps each job in a data platform to a service on each cloud. The program prints the same architecture on AWS, Azure and Google Cloud. Then try the challenges: compare scan costs, always-on vs on-demand clusters, spot savings, egress and storage tiers.
services = {
"lake storage": {"AWS": "S3", "Azure": "ADLS Gen2", "GCP": "Cloud Storage"},
"managed Spark": {"AWS": "EMR / Glue", "Azure": "Databricks", "GCP": "Dataproc"},
"warehouse": {"AWS": "Redshift", "Azure": "Synapse/Fabric", "GCP": "BigQuery"},
"event stream": {"AWS": "Kinesis/MSK","Azure": "Event Hubs", "GCP": "Pub/Sub"},
"orchestration": {"AWS": "MWAA", "Azure": "Data Factory", "GCP": "Cloud Composer"},
}
design = ["event stream", "lake storage", "managed Spark", "warehouse", "orchestration"]
for cloud in ["AWS", "Azure", "GCP"]:
print(f"{cloud:5}: " + " -> ".join(services[job][cloud] for job in design))"lake storage": {"AWS": "S3", "Azure": "ADLS Gen2", "GCP": "Cloud Storage"},Every cloud has the same categories; only the product names differ.design = ["event stream", "lake storage", "managed Spark", "warehouse", "orchestration"]Design in categories first, then pick the product on the chosen cloud.
Run it on your PC: estimate and shrink a cloud bill
This program estimates the monthly bill of a small cloud data platform (storage, SQL scans, a Spark cluster and data transfer) with illustrative prices, then applies five fixes one by one: columnar files and partitions, auto-shutdown, spot workers and keeping data in region. Change the assumptions at the top and run it again. Save it as cloud_bill.py.
A cloud bill, before and after FinOps
"""Estimate a monthly cloud bill for a small data platform, and see what
partitioning, columnar files, spot instances and auto-shutdown save.
All prices are ILLUSTRATIVE round numbers in rupees, not a real price list."""
PRICE = {
"storage_per_tb_month": 1_900, # object storage, standard tier
"scan_per_tb": 450, # serverless SQL, charged per TB scanned
"node_hour_on_demand": 40, # one Spark worker node
"node_hour_spot": 12, # same node as spot / preemptible capacity
"egress_per_tb": 7_000, # data sent out of the cloud region
}
LAKE_TB = 60
QUERIES_PER_DAY = 400
NIGHTLY_NODES, NIGHTLY_HOURS = 20, 3
def bill(scan_tb_per_query, spot, cluster_always_on, egress_tb):
storage = LAKE_TB * PRICE["storage_per_tb_month"]
scans = scan_tb_per_query * QUERIES_PER_DAY * 30 * PRICE["scan_per_tb"]
rate = PRICE["node_hour_spot"] if spot else PRICE["node_hour_on_demand"]
hours = 24 if cluster_always_on else NIGHTLY_HOURS
compute = NIGHTLY_NODES * hours * 30 * rate
egress = egress_tb * PRICE["egress_per_tb"]
return {"storage": storage, "queries": scans, "compute": compute, "egress": egress}
def show(name, b):
total = sum(b.values())
parts = ", ".join(f"{k} {v / 1e5:.1f}L" for k, v in b.items())
print(f"{name:37} Rs {total / 1e5:6.1f} lakh/month ({parts})")
return total
before = show("1. Naive: CSV, SELECT *, always on", bill(0.8, False, True, 5))
step2 = show("2. + Parquet, partitions, columns", bill(0.02, False, True, 5))
step3 = show("3. + cluster only for the 3-hour job", bill(0.02, False, False, 5))
step4 = show("4. + spot workers", bill(0.02, True, False, 5))
after = show("5. + keep data in-region (no egress)", bill(0.02, True, False, 0))
print(f"\nSaving: {(1 - after / before) * 100:.0f}% of the original bill")
# In a terminal: python cloud_bill.pyRecorded from a real run with Python 3.13. The prices are round illustrative numbers, not any provider's price list; use your cloud's pricing calculator for real estimates. The pattern is what matters: badly laid-out data scanned many times and idle clusters usually dominate the bill.
Adding up a cloud bill, one line at a time
Three meters are added: storage, compute and scans. Watch the total grow, and notice which meter dominates.
Worked examples: real problems, solved and traced in memory
Four cloud decisions, from mapping services to estimating a spot-instance plan. Each runs live and is traced.
Find the equivalent service
Problem statement
A team moving from AWS to Google Cloud lists the AWS services it uses. Print the Google Cloud equivalent of each.
S3, EMR, Redshift, Kinesis, MWAA
S3 -> Cloud Storage EMR -> Dataproc Redshift -> BigQuery Kinesis -> Pub/Sub MWAA -> Cloud Composer QuickSight -> no direct match: check docs
Approach
- Store an AWS → GCP mapping in a dictionary.
- Look up each service.
- Print “no direct match” for anything missing.
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.
Cost of a dashboard on a pay-per-scan engine
Problem statement
A dashboard has 6 charts, refreshed every 15 minutes during 12 working hours. Each chart scans 25 GB. At an illustrative ₹450 per TB, what does it cost per month (22 working days), and what if refreshed hourly from a small aggregate table scanning 0.5 GB per chart?
6 charts, every 15 min × 12 h, 25 GB each, 22 days
every 15 min, raw table : 154.7 TB scanned, Rs 69,609 per month hourly, aggregate table : 0.8 TB scanned, Rs 348 per month
Approach
- Refreshes per day = 12 hours × 4.
- TB per month = charts × refreshes × days × GB ÷ 1024.
- Cost = TB × price.
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 a fixed cluster beat serverless?
Problem statement
Serverless costs ₹450 per TB scanned. A provisioned warehouse costs ₹3 lakh per month regardless of use. Find the break-even monthly scan volume and decide for teams scanning 150 TB and 1,200 TB a month.
₹450/TB vs ₹3 lakh/month · 150 TB, 1,200 TB
break-even: 667 TB per month marketing : serverless Rs 67,500 vs fixed Rs 300,000 -> serverless data science: serverless Rs 540,000 vs fixed Rs 300,000 -> provisioned
Approach
- Break-even TB = fixed cost ÷ price per TB.
- Below it, serverless is cheaper; above it, provisioned is.
- Compare both teams.
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.
Plan a spot-heavy Spark cluster
Problem statement
A nightly job needs 160 node-hours. On-demand costs ₹40/hour, spot ₹12/hour. History shows 15% of spot node-hours are lost to reclaims and must be redone. The driver and 2 core nodes stay on-demand for the full 4-hour run. Compare all-on-demand with the mixed plan.
160 node-hours, ₹40 vs ₹12, 15% rework, 3 on-demand nodes × 4 h
all on-demand: Rs 6400 mixed plan : Rs 2522 (170 spot node-hours incl. rework) saving : 61%
Approach
- All on-demand: node-hours × ₹40 (the 3 fixed nodes are part of the 160).
- Mixed: 12 on-demand node-hours plus the rest on spot, inflated by 15% rework.
- Compare costs.
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.6 in one screen
- Cloud = on-demand, pay-per-use, managed services, elastic; storage and compute separated.
- Models: IaaS (VMs) → managed PaaS → serverless → SaaS platforms (Databricks, Snowflake, Confluent).
- Map: storage S3 / ADLS Gen2 / Cloud Storage · Spark EMR-Glue / Databricks / Dataproc · warehouse Redshift / Synapse-Fabric / BigQuery.
- Streaming Kinesis-MSK / Event Hubs / Pub/Sub · orchestration MWAA / Data Factory / Cloud Composer.
- Cost meters: storage, compute, scans, requests, egress. FinOps: tags, budgets, layouts, auto-shutdown, spot.
- Spot/preemptible: cheap but reclaimable → stateless, retryable work only.
- Security is shared; avoid lock-in with open formats; payment data stays in Indian regions (RBI).
Interview and viva questions
What are the benefits of cloud computing for big data?
Elastic scaling to handle peaks and shrinking afterwards, pay-per-use pricing without large upfront hardware purchases, managed services that remove installation and maintenance work, separation of storage and compute so each scales independently, global regions for low latency and disaster recovery, and fast experimentation with new tools.
Compare the big data services of AWS, Azure and GCP.
For storage: Amazon S3, Azure Data Lake Storage Gen2/Blob, Google Cloud Storage. Managed Spark/Hadoop: Amazon EMR and AWS Glue, Azure Databricks/Fabric/HDInsight, Google Dataproc. Data warehouses: Amazon Redshift, Azure Synapse Analytics/Microsoft Fabric, Google BigQuery. Streaming: Amazon Kinesis and MSK, Azure Event Hubs, Google Pub/Sub. Orchestration: Amazon MWAA and Step Functions, Azure Data Factory, Google Cloud Composer. Databricks, Snowflake and Confluent run on all three.
What is serverless in the context of big data?
A model where you submit queries or jobs without choosing or managing servers; the provider allocates capacity automatically and bills by usage, such as per TB scanned (Athena, BigQuery on-demand), per job or per second of processing (serverless Spark, Dataflow). It is convenient for spiky workloads but needs care to control costs.
How do you control cloud costs for a data platform?
Tag resources by team and project, set budgets and alerts, use columnar formats and partitioning to reduce scans, select only needed columns, build aggregate tables for dashboards, auto-terminate idle clusters and autoscale, use spot capacity for fault-tolerant jobs, apply storage lifecycle tiers, reduce egress, and review the most expensive queries and resources regularly (FinOps).
What is vendor lock-in and how can it be reduced?
Lock-in is the difficulty and cost of moving away from a provider because your data, code and processes depend on its proprietary services. It can be reduced by keeping data in open formats (Parquet, Delta Lake, Iceberg), using open engines and APIs (Spark, Kafka protocol, Airflow, standard SQL), infrastructure-as-code, and isolating provider-specific code behind clear interfaces.
Practice problems
Cloud cost and design exercises with illustrative prices. The last two are business tasks.
Storage bill
Store 25 TB at Rs 1,900 per TB-month. Print the monthly cost.
25 TB
47500
Show solution and explanation
print(25 * 1900)How it works: Storage is billed per GB- or TB-month of data kept.
Scan cost
A query scans 300 GB at Rs 450 per TB. Print its cost.
300 GB
131.84
Show solution and explanation
print(round(300 / 1024 * 450, 2))How it works: Convert GB to TB, then multiply by the price.
Service look-up
Print the Azure service for event streaming.
event streaming
Event Hubs
Show solution and explanation
azure = {"storage": "ADLS Gen2", "spark": "Azure Databricks", "event streaming": "Event Hubs"}
print(azure["event streaming"])How it works: Event Hubs is Azure's managed streaming service.
Idle cluster waste
A 12-node cluster at Rs 40/node-hour runs 24 h/day but is busy only 5 h. Print the monthly cost of idle hours.
12 nodes, 19 idle h/day
273600
Show solution and explanation
print(12 * 40 * 19 * 30)How it works: Auto-termination after a job removes this waste.
Pruned scan
A 36 TB table is partitioned into 360 days and has 18 equal columns. A query reads 7 days and 3 columns. Print TB scanned.
36 TB, 7/360 days, 3/18 columns
0.117 TB
Show solution and explanation
print(round(36 * 7 / 360 * 3 / 18, 3), "TB")How it works: Partitions cut rows; columnar storage cuts columns.
Spot vs on-demand
300 node-hours. On-demand Rs 40, spot Rs 12 with 20% rework. Print both costs.
300 nh
on-demand: 12000 | spot: 4320
Show solution and explanation
print("on-demand:", 300 * 40, "| spot:", round(300 * 1.2 * 12))How it works: Even with rework, spot is much cheaper for retryable work.
Break-even reservation
On-demand costs Rs 40/hour; a 1-year commitment costs Rs 2,10,000 per node for the year. Above how many hours per year of use is the commitment cheaper?
Rs 40/h vs Rs 2.1 lakh/year
5250 hours per year ( 60 % of the year )
Show solution and explanation
hours = 2_10_000 / 40
print(round(hours), "hours per year (", round(hours / 8760 * 100), "% of the year )")How it works: Commitments pay off for steady, always-on workloads; on-demand or spot for spiky ones.
Monthly platform estimate
Storage 50 TB (Rs 1,900/TB), 10 TB scanned per day (Rs 450/TB), a 15-node cluster 4 h/day (Rs 40/node-hour). Print the monthly total in lakh.
as given
Rs 3.02 lakh per month
Show solution and explanation
total = 50 * 1900 + 10 * 30 * 450 + 15 * 4 * 30 * 40
print(f"Rs {total / 1e5:.2f} lakh per month")How it works: A first estimate like this belongs in every design document.
Cost per order
The data platform costs Rs 2.4 lakh per month and the company handles 30 crore orders a month. Print the data-platform cost per 1,000 orders.
Rs 2.4 lakh, 30 crore orders
Rs 0.80 per 1,000 orders
Show solution and explanation
print(f"Rs {2.4e5 / 30e7 * 1000:.2f} per 1,000 orders")How it works: Unit cost makes platform spend comparable as the business grows.
Real-world scenario questions (asked in company interviews)
Cloud questions from real projects and interviews. Decide your answer first, then open the model answer.
Design a small analytics platform on a cloud
A start-up wants daily dashboards from app events and its PostgreSQL database, on any one cloud, with a tiny team.
The interviewer is checking: can you assemble the standard building blocks and justify them?
Show a strong answer
- Ingest: app events to a managed stream, delivered to object storage; database changes extracted nightly (or with change data capture).
- Store: object storage lake with bronze/silver/gold zones, Parquet with Delta Lake or Iceberg, in an Indian region.
- Process: serverless or managed Spark jobs, or SQL/dbt in a cloud warehouse.
- Serve: warehouse or serverless SQL for BI dashboards.
- Orchestrate: managed Airflow.
- Govern and secure: catalog, IAM roles, encryption, budgets and tags from day one.
Avoid: listing ten services without explaining how data flows or what it costs.
The query bill tripled this month
Serverless SQL costs tripled. Data volume grew only 10%.
The interviewer is checking: can you investigate and fix cloud cost problems?
Show a strong answer
- Find the top queries by bytes scanned and who ran them (query history, cost reports by tag).
- Look for
SELECT *, missing partition filters, dashboards refreshing every minute and new unpartitioned tables. - Fix the layout: Parquet, partitions, clustering; create small aggregate tables for dashboards.
- Add guardrails: per-user or per-workgroup scan limits, required partition filters, budget alerts.
- Share a weekly cost report with teams.
Avoid: switching to a bigger fixed cluster without finding what changed.
Can we use a cheaper overseas region?
A fintech’s finance team notices that an overseas region is cheaper and asks to move the payments analytics lake there.
The interviewer is checking: do you know that region choice is a compliance decision?
Show a strong answer
Payment-system data in India must be stored in India under the RBI’s 2018 direction on storage of payment system data, and other data may have contractual or DPDP-related obligations. Keep the lake in Indian regions, use a second Indian region for disaster recovery, and reduce cost through layout, lifecycle tiers, reserved or committed-use discounts and spot capacity instead. Involve the compliance team before moving any regulated data.
Avoid: deciding on price alone.
“What are the advantages and risks of cloud for big data?”
A common question in data engineering interviews.
The interviewer is checking: can you give a balanced answer with examples?
Show a strong answer
Advantages: elasticity (scale up for peaks and down afterwards), pay-per-use, managed services that save operations work, separation of storage and compute, global regions, fast experimentation. Risks: uncontrolled costs (scans, idle clusters, egress), vendor lock-in, security misconfiguration (public buckets, broad permissions), data-residency rules, and dependence on provider outages. Mitigations: FinOps practices, open formats, least-privilege security, region planning and multi-zone designs.
Avoid: saying only “the cloud is cheaper”.