Big Data on the Cloud
Buying scale instead of building clusters
Cloud changed how big data is produced and consumed: managed engines (EMR, Dataproc, Glue), serverless analytics, object storage as the data lake, and autoscaling that matches spend to traffic. The tradeoffs are cost modeling, cold-start latency and egress fees.
What you will learn
- Compare managed Spark (EMR/Dataproc) vs serverless (Athena/BigQuery)
- Explain object storage as the decentralized data lake
- Model cloud cost per query engine
What is this?
Cloud big data replaces 'own a cluster' with 'rent the compute for the job': managed clusters (EMR, Dataproc) when you own the lifecycle, serverless query engines (Athena, BigQuery, Databricks SQL) when you don't, and object storage (S3, GCS, ADLS) as the shared lake. Autoscaling scales to zero or to a spike on demand — the job's cost becomes measurable per query.
Why do you need it?
- Object storage decouples storage from compute: store once, query with whichever engine fits.
- Autoscaling matches spend to traffic rather than uptime.
- Serverless removes cluster ops — the cloud handles provision, scale and repair.
- Cloud analytics do the 'scale up for the month-end report' dance nobody wants to run themselves.
Mental model
Renting a car vs your own garage
Cloud big data
Your garage (self-hosted) is there always but idle most of the time. Renting (cloud) gives you a truck for moving week and a scooter for errands — pay only for the trips you take; the rental company handles maintenance and fleet scale.
How it works
- Object storage (S3/GCS/ADLS) holds data lake files; compute engines read them directly.
- Managed Spark (EMR/Dataproc) starts an ephemeral cluster for a job, then tears it down.
- Serverless engines (Athena/BigQuery) run SQL via on-demand resources without you picking cluster size.
- Autoscaling adjusts worker counts by workload metrics, down to zero out of hours.
- Data transfer in/out, storage tiering and engine pricing build the real bill.
Cloud big-data consumption model.
In production
- A startup keeps all raw logs in S3, queries interactively with Athena, and runs nightly Spark on autoscaling EMR only during the batch window.
- A finance firm runs BigQuery serverless, scaling SLAs without a cluster team.
- A lakehouse on GCS + Dataproc autoscales its Spark ETL, dropping the nighttime bill to near zero.
Best practices
- Keep the lake in object storage with partition pruning (by date/tenant) so serverless scans stay bounded.
- Model the cost per query before choosing serverless: scan pricing favors narrow, filtered workloads.
- Use autoscaling for spikes, but pin a baseline for SLA-critical production jobs.
- Watch data egress: cross-region and cloud-transfer costs can dominate over in-region compute.
Common mistakes
- Storing analytics data in a database when object storage would be 10x cheaper idle.
- Under-partitioning the lake so every Athena query scans terabytes.
- Using serverless engines for long-running, compute-bound pipelines (mismatch).
- Forgetting egress/scan pricing in the TCO — the 'cloud is cheap' invoice myth.
Common issues
Time-of-day cluster spin-up causes 15-min jobs to take an hourCold-start provisioning latency for a fresh Spark cluster
Pre-warm a standby node group, or use serverless for the pattern.
Lake queries scan 10x more than neededIncorrect/absent partition or file-tier layout
Partition by the dominant filter and use columnar (Parquet) so scans skip columns.
Spot nodes killed mid-ETLEphemeral spot capacity reclaimed
Use durable/on-demand for critical stages, checkpoint state, and retry logic.
Debugging tips
- Query slow? Check the scanned bytes vs your partition filters first.
- Billing surprise → look at scan-heavy statements and cross-region transfers in the cost explorer.
- Cold start of serverless reads? Cache hot metadata and keep the lake warm.
- Ephemeral clusters tearing down mid-job? Check spot reclaim or idle timeout settings.
Interview checkpoint
Quick quiz
The most common way to control serverless-query cost in a data lake is...
Egress/data-transfer fees are usually negligible in cloud big-data bills.