Intermediatehow it works
How do you approach a data pipeline system design question?
Quick answer
I clarify first: who consumes the data, how fresh it must be, the volume and peak, whether the source can replay, and the SLA. Then I estimate rates and storage.
I clarify first: who consumes the data, how fresh it must be, the volume and peak, whether the source can replay, and the SLA. Then I estimate rates and storage. I sketch ingest, storage layers, processing and serving, and name the tools only after the shape is clear. Then failures: retries, duplicates, late data, bad records. Then quality checks, monitoring and alerting, and finally cost and the trade-offs I made, including what I would do differently at ten times the volume.
Animated explanation
- 1Clarifyconsumers, latency, volume, SLA
- 2Estimateevents/s, GB/day
- 3Sketchingest, store, process, serve
- 4Failuresretry, duplicates, late data
- 5Qualitychecks, reconciliation
- 6Operatemonitoring, cost, trade-offs
Key points
- clarify requirements
- estimate
- data flow before tools
- failure handling
- trade-offs
Common mistakes
- Naming Kafka and Spark in the first minute, before knowing the latency need.
References
- Google SRE book: data processing pipelines
- Jay Kreps (O'Reilly): Questioning the Lambda Architecture
- Apache Airflow: best practices (idempotent tasks)
- Kafka message delivery semantics
- Spark Structured Streaming: watermarks, deduplication, sinks
- Spark Structured Streaming + Kafka integration
- Confluent Schema Registry: schema evolution and compatibility
- Databricks: medallion architecture