Case Study
A cloud-native streaming pipeline that ingests events from Kafka, processes them with Apache Flink, and writes curated data to a cloud data lake.
A personal reference implementation of a streaming data platform: Kafka for ingestion, Apache Flink for stateful stream processing, and a Hudi-managed data lake for curated, queryable output.
Batch-only pipelines introduce latency that isn't acceptable for use cases like operational dashboards or near-real-time analytics. At the same time, naive streaming implementations often skip the details that make streaming trustworthy: exactly-once semantics, schema enforcement, and recovery from failure. The goal was to build a streaming pipeline that treats correctness and recoverability as first-class requirements, not afterthoughts.
Producers publish events to Kafka. A Flink job consumes each topic, applies schema validation and stateful transformations (windowing, deduplication, enrichment), and checkpoints state to durable storage on a fixed interval. Validated, transformed records are written to a Hudi table on S3, partitioned for efficient querying. Job and pipeline metrics are scraped by Prometheus and visualized in Grafana.
Use Flink instead of a simpler consumer-based service.
Flink's native support for event-time processing, windowing, and checkpointed state made it a better fit than hand-rolled consumer logic once the pipeline needed exactly-once guarantees.
Use Hudi rather than plain Parquet for the lake tables.
Streaming data frequently needs upserts and late-arriving corrections. Hudi's table format supports that without rewriting entire partitions.
Checkpoint failures under state backend pressure.
Tuned checkpoint interval and state backend configuration, and added checkpoint-duration and failure-count metrics to Grafana so regressions are visible before they cause job restarts.
Duplicate records after task-manager restarts.
Verified end-to-end exactly-once configuration (Kafka transactional producer settings plus Flink checkpointing) and added a deduplication step keyed on event identifiers as a defense-in-depth measure.
The resulting pipeline processes Kafka events through Flink with checkpointed, stateful transformations and lands validated, deduplicated records in a Hudi-managed lake table — recoverable from failure and observable end-to-end.
Verified results have not been published for this project yet.