Member-only story
Apache Spark Data Pipeline Design: 15 Trade-offs Every Data Engineer Should Understand
How to reason about Spark pipelines beyond simply choosing Kafka, S3, Iceberg, and Snowflake
Designing an Apache Spark data pipeline is not primarily about picking technologies.
It is about making trade-offs.
Should the pipeline be batch or streaming? Should you keep immutable raw data? How many partitions should Spark process? Should you pre-aggregate data? How do you make reruns idempotent? When does an optimization actually make the pipeline harder to operate?
A typical Spark data pipeline may look simple:
Data Source
↓
Ingestion
↓
Raw Storage
↓
Apache Spark
↓
Cleaned / Enriched Data
↓
Aggregations
↓
Serving LayerThe difficult part is deciding what happens at every arrow.
Here are the most important Spark data pipeline design trade-offs.
1. Spark Batch vs Spark Structured Streaming
This is usually one of the first decisions.
Batch
Data
↓
Storage
↓
Scheduled Spark Job
↓
Processed DataAdvantages:
- simpler recovery
- easier backfills
- simpler debugging
- usually lower operational complexity










