flink – Whatvis https://whatvis.com Sat, 26 Sep 2026 22:29:08 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.5 https://whatvis.com/wp-content/uploads/2025/04/cropped-cut_out20260423_143934-32x32.webp flink – Whatvis https://whatvis.com 32 32 Delivery Hero Transforms Global Advertising Infrastructure with Real-Time Data Pipeline Migration to Amazon Managed Service for Apache Flink https://whatvis.com/delivery-hero-transforms-global-advertising-infrastructure-with-real-time-data-pipeline-migration-to-amazon-managed-service-for-apache-flink/ https://whatvis.com/delivery-hero-transforms-global-advertising-infrastructure-with-real-time-data-pipeline-migration-to-amazon-managed-service-for-apache-flink/#respond Sat, 26 Sep 2026 22:29:08 +0000 https://whatvis.com/delivery-hero-transforms-global-advertising-infrastructure-with-real-time-data-pipeline-migration-to-amazon-managed-service-for-apache-flink/ Delivery Hero, the Berlin-based global leader in local delivery platforms, has successfully completed a comprehensive overhaul of its advertising measurement architecture, transitioning from a legacy batch-processing system to a real-time streaming pipeline powered by Amazon Managed Service for Apache Flink. This technological shift, executed in collaboration with a team of lead engineers including Kirill Tishenkov, Alexandru Pisarenco, Upendra Kambhampati, and Sabariesh Ganesan, marks a significant evolution in how the company manages the complex data flow generated by its operations in over 65 countries.

Operating at a scale that spans Asia, Europe, Latin America, the Middle East, and North Africa, Delivery Hero facilitates millions of daily orders for food, groceries, and essential goods. At the heart of this logistical network is a sophisticated advertising platform that connects over 1.5 million restaurant partners and local vendors with a massive, active consumer base. In 2025, this advertising arm generated approximately EUR 1.5 billion in revenue, a figure that underscores the commercial imperative of ensuring precise billing and high-fidelity data attribution.

The Technical Limitations of Legacy Batch Processing

Prior to the migration, Delivery Hero’s advertising measurement relied on a system that ingested impression, click, and order events from message queues, processed them via synchronous API calls, and finalized metrics in hourly batch cycles. While this architecture was sufficient during the early stages of the platform’s growth, it encountered critical failures as traffic volume soared to billions of events per day.

The legacy system suffered from five structural weaknesses that constrained the business. First, the lack of event-time semantics meant the system relied on processing time. This led to significant data skew when ingestion lagged or events arrived out of sequence, complicating the calculation of metrics like Return on Ad Spend (ROAS). Furthermore, the 61-minute average latency between an event occurring and its registration made real-time budget pacing virtually impossible.

Second, the reliance on synchronous API calls for data enrichment—attaching campaign metadata and product information to raw events—created a performance bottleneck. During traffic spikes, such as major sales events, these blocking calls exhausted connection pools, causing cascading failures across the billing and ad-serving layers.

Third, the database infrastructure was ill-suited for the workload. Originally designed for document storage, the NoSQL database struggled with the continuous deduplication and multi-day attribution lookups required for modern ad measurement. This resulted in significant read/write amplification, where storage costs scaled linearly with query latency, eventually leading to recurring production outages during peak demand.

Fourth, the system lacked a native mechanism for event reprocessing. Recovery from data corruption or logic errors required manual intervention, custom CLI scripts, and disparate tools for different consuming systems, creating a significant coordination burden across engineering teams. Finally, the "best-effort" nature of synchronous enrichment left substantial gaps in data quality, with millions of impressions arriving without reliable timestamps, which subsequently compromised the accuracy of machine learning models used for campaign ranking and conversion estimation.

The Path to Real-Time Streaming: Architecture and Implementation

To address these systemic issues, Delivery Hero’s engineering team defined a new, non-negotiable set of requirements: fault-tolerant processing to eliminate data loss, stateful stream processing capable of handling multi-day interaction history, and a fully managed infrastructure to reduce the operational burden on engineering staff.

How Delivery Hero rebuilt real-time ad measurement with Apache Flink | Amazon Web Services

The selection of Amazon Managed Service for Apache Flink was central to the solution. By leveraging Flink’s native event-time watermark model, the team gained the ability to accurately order late-arriving data. To solve the state management challenges that plagued the legacy system, the team utilized Flink’s RocksDB state backend, which allows for large keyed state storage on disk without placing excessive pressure on the Java Virtual Machine (JVM) heap.

The architecture was redesigned using a tiered approach. Amazon Kinesis Data Streams replaced the previous buffering mechanisms to serve as the upstream event bus, offering superior cost efficiency at scale. For enrichment, the team moved away from synchronous blocking calls, opting instead for Flink’s Async I/O API to query Amazon DynamoDB. This decoupling allowed the enrichment process to scale independently of the ingestion layer.

The production pipeline, now fully operational, follows a five-stage process: event ingestion and decryption, deduplication, enrichment from reference data, attribution, and finally, aggregation and emission. Granular events are persisted in Avro format on Amazon Simple Storage Service (S3), which also serves as the checkpoint store for Flink’s state. This setup ensures that in the event of a system failure, the pipeline can restore its state precisely from the last checkpoint, achieving effectively "exactly-once" billing, even across a distributed transport layer.

Quantifiable Performance Gains and Operational Impact

The transition to a real-time model has yielded measurable improvements across every key performance indicator. The most notable metric is the reduction in processing latency, which dropped from 61 minutes to just 1.2 seconds. This improvement enables the advertising platform to act on real-time signals, significantly enhancing the precision of budget pacing and campaign optimization.

Financial efficiency also improved dramatically. By optimizing the architecture and moving to a fully managed cloud service, Delivery Hero reduced its monthly operational costs by approximately 57 percent. This reduction was achieved alongside a marked increase in system reliability, as the new infrastructure eliminated the "fragility" of the previous synchronous chain.

Data quality metrics showed the most striking improvement. The rate of missing session data, which previously fluctuated between 30 and 40 percent, was reduced to 0 percent. Similarly, missing customer IDs fell from 5 percent to 0.8 percent, and missing impression timestamps—a major issue at 91 percent in the legacy system—dropped to a negligible 0.2 percent. These gains have provided the company’s machine learning models with a clean, comprehensive data stream, resulting in more accurate conversion-rate estimations and better-performing campaign ranking algorithms.

Industry Implications and Future Roadmap

The success of this migration offers a blueprint for other high-scale advertising platforms currently struggling with the limitations of batch-based processing. The integration of Amazon EventBridge Pipes for rapid deployment and the strategic use of S3 for durable, replayable event logs highlights a broader trend in the industry: the move toward "data as a first-class citizen," where historical logs are treated as an active asset rather than a secondary artifact.

According to the engineering team at Delivery Hero, this architecture is only the beginning. The platform is already planning to expand the real-time pipeline to accommodate additional ad formats and is exploring the integration of Flink-based aggregations directly into the ad-serving layer. Furthermore, the team intends to leverage this high-speed data foundation for advanced artificial intelligence initiatives, including live user personalization and grounded Large Language Model (LLM) recommendations—applications that were previously impractical under the limitations of a batch-oriented environment.

The shift at Delivery Hero serves as a compelling case study for companies navigating the complexities of digital advertising at a global scale. By reconciling the competing demands of billing accuracy, stateful attribution, and cost-effective scalability, the company has established a robust framework that is not only resilient to current traffic demands but is also prepared for the next generation of AI-driven consumer interactions. As digital marketplaces continue to mature, the transition from periodic reconciliation to continuous, real-time measurement is increasingly becoming the new industry standard.

]]>
https://whatvis.com/delivery-hero-transforms-global-advertising-infrastructure-with-real-time-data-pipeline-migration-to-amazon-managed-service-for-apache-flink/feed/ 0
Building Resilient Streaming Data Pipelines with Dynamic Apache Iceberg Sinks on Amazon Managed Service for Apache Flink https://whatvis.com/building-resilient-streaming-data-pipelines-with-dynamic-apache-iceberg-sinks-on-amazon-managed-service-for-apache-flink/ https://whatvis.com/building-resilient-streaming-data-pipelines-with-dynamic-apache-iceberg-sinks-on-amazon-managed-service-for-apache-flink/#respond Mon, 14 Sep 2026 22:45:21 +0000 https://whatvis.com/building-resilient-streaming-data-pipelines-with-dynamic-apache-iceberg-sinks-on-amazon-managed-service-for-apache-flink/ In the modern data landscape, the agility of a streaming architecture is often tested by the inevitability of upstream schema evolution. Engineering teams managing data lakes frequently encounter a persistent operational bottleneck: when a source system modifies its data structure—adding fields, changing types, or introducing new event categories—the downstream ingestion pipeline often requires a complete shutdown. This necessity to halt, update, and redeploy not only results in significant downtime but also introduces risks of data loss, stale metrics, and increased toil. Recent advancements in the integration of Apache Flink 2.3 and Apache Iceberg 1.11.0 on Amazon Managed Service for Apache Flink have introduced a paradigm shift, enabling dynamic, per-record routing and automated schema evolution that allows pipelines to adapt in real-time without operator intervention.

The Operational Challenge of Static Pipelines

Historically, streaming pipelines were architected as static entities. A Flink job configured to ingest order_events was typically hard-coded to expect a specific schema. Should an upstream team decide on a Wednesday that an order_events stream should also include a loyalty_tier field or that an entirely new interaction_events stream should be processed, the conventional response was to pause the Flink job, modify the schema registry or local definitions, and perform a rolling deployment.

Industry data suggests that for high-volume streaming environments, these manual interventions account for nearly 30% of total pipeline maintenance time. Beyond the engineering hours consumed, the "stop-the-world" requirement creates an operational gap. While the pipeline is offline, in-flight data must either be buffered in intermediate storage or, in worst-case scenarios, discarded. If the data lake falls out of sync with the upstream source, downstream analytics dashboards and machine learning models relying on that data produce inaccurate results, leading to a loss of trust in the data platform.

A New Architecture: The Dynamic Sink

The introduction of the Dynamic Iceberg Sink represents a move away from rigid, per-pipeline configurations toward a more fluid, metadata-driven architecture. By leveraging the DataStream API in Apache Flink, developers can now resolve the destination table at the individual record level. This means a single Flink application can ingest a heterogeneous mix of events, analyze the metadata of each record, and route it to the appropriate Iceberg table in Amazon S3 automatically.

The underlying mechanism for this flexibility is the DynamicRecord class. Each DynamicRecord encapsulates the necessary metadata—including the target table ID, schema, partition specifications, and the row payload—ensuring that the sink has complete instructions for every item processed. If a table does not exist when a record arrives, the sink creates it on the fly. If an existing table receives a record containing new fields, the sink performs an immediate schema evolution, adding the new columns as optional fields. This ensures that historical data files remain valid while new data is captured according to the updated schema.

Technical Implementation and Schema Governance

The transition to dynamic sinks requires a robust approach to schema management. There are two primary methodologies for achieving this: schema inference from the data itself and integration with a centralized schema registry, such as the AWS Glue Schema Registry (GSR).

The Inference Model

For environments where schemas are semi-structured or evolving rapidly, runtime inference allows the pipeline to adapt without a pre-defined contract. The SchemaAgnosticRoutingGenerator processes incoming JSON, mapping fields to table names and inferring the appropriate Iceberg types. To prevent the loss of data precision, the system employs conservative type-widening rules. For instance, all integral values are mapped to LongType, and floating-point values are mapped to DoubleType. While highly convenient, this model is fundamentally "lossy" because JSON does not explicitly carry complex type information.

Build a dynamic streaming data lake with Apache Iceberg and Apache Flink | Amazon Web Services

The Governed Model

For enterprise-grade environments that require strict data contracts, the integration with AWS Glue Schema Registry is the preferred solution. In this scenario, producers register schemas in the registry, and each record is tagged with a schema-version ID. The Flink consumer fetches the exact writer schema, ensuring that types are mapped with high precision—such as differentiating between timestamp-millis and timestamp-micros. This approach enforces governance; if a producer attempts to push a schema change that violates predefined compatibility rules (e.g., BACKWARD or FORWARD compatibility), the registry rejects the change, preventing corrupted data from reaching the data lake.

Chronology of Evolution: From Static to Fluid

The industry’s shift toward this model has occurred in three distinct phases:

  1. The Static Era (Pre-2020): Pipelines were strictly defined by fixed schemas. Any change required a full redeployment and potential downtime of several minutes to hours.
  2. The Metadata-Aware Era (2020–2023): Teams began utilizing external schema registries and custom code to handle schema drift, but the sink logic remained largely tied to static configurations, requiring custom wrappers to achieve "dynamic" behavior.
  3. The Dynamic Era (2024–Present): With native support for DynamicIcebergSink in Flink 2.3 and Iceberg 1.11.0, the "sink" itself has become a first-class citizen in handling schema evolution. The complexity has shifted from the infrastructure layer to the logic layer, where developers focus on defining routing rules rather than infrastructure management.

Impact on Data Reliability and Consistency

The core value proposition of this architecture lies in the combination of Apache Flink’s checkpointing mechanism and Apache Iceberg’s two-phase commit. This pairing provides end-to-end exactly-once processing guarantees. Because the dynamic sink handles schema updates as atomic operations—often using an "immediate table update" flag—there is no risk of a partial schema application where half a batch is written with an old schema and half with a new one.

From an analytical standpoint, this stability is critical. When a schema evolves, Iceberg tables handle the change by adding columns as optional, ensuring that queries against historical data do not fail. Queries scanning both old and new files will simply return null for the new columns in older partitions, maintaining backward compatibility for SQL engines like Amazon Athena or Amazon Redshift.

Broader Implications for Streaming Infrastructure

The ability to maintain a unified pipeline for multiple event types significantly reduces the cloud footprint of data engineering teams. By consolidating many small-to-medium event streams into a single, high-capacity Flink job, organizations can pool their compute resources. This reduces the number of idle Flink TaskManagers that would otherwise be required to maintain separate jobs for each event type.

However, architects must be cautious regarding the "noisy neighbor" effect. In a unioned pipeline, a sudden spike in volume for one event type could potentially cause backpressure that affects all other routed streams. Consequently, the recommendation is to reserve this unified approach for streams with similar SLAs, while isolating mission-critical, high-volume event sources into their own dedicated applications.

Future Outlook

As organizations move toward "Data Mesh" architectures, the ability to automate the lifecycle of tables becomes a foundational capability. The current trajectory in streaming technology points toward a future where "schema management" is an invisible background process, handled by intelligent sinks that negotiate contracts between producers and consumers in real-time. By removing the operational friction of schema changes, teams can pivot their focus from managing pipeline downtime to building more sophisticated data products, ultimately accelerating the time-to-insight for the entire organization. The integration of Managed Service for Apache Flink with Apache Iceberg provides the robust, scalable framework necessary to sustain this evolution in the years to come.

]]>
https://whatvis.com/building-resilient-streaming-data-pipelines-with-dynamic-apache-iceberg-sinks-on-amazon-managed-service-for-apache-flink/feed/ 0
Unifying Data Lake Architectures with Apache Iceberg and Amazon Managed Service for Apache Flink to Eliminate Dual-Pipeline Inefficiencies https://whatvis.com/unifying-data-lake-architectures-with-apache-iceberg-and-amazon-managed-service-for-apache-flink-to-eliminate-dual-pipeline-inefficiencies/ https://whatvis.com/unifying-data-lake-architectures-with-apache-iceberg-and-amazon-managed-service-for-apache-flink-to-eliminate-dual-pipeline-inefficiencies/#respond Sat, 18 Apr 2026 07:47:36 +0000 https://whatvis.com/unifying-data-lake-architectures-with-apache-iceberg-and-amazon-managed-service-for-apache-flink-to-eliminate-dual-pipeline-inefficiencies/ The landscape of modern data engineering is currently undergoing a significant shift as enterprises move away from the traditional, fragmented approach to data processing. For years, organizations have relied on the "dual-pipeline" architecture—maintaining one pipeline for real-time streaming and another for batch processing—to handle the varying latencies required for business intelligence and operational analytics. However, this model has introduced substantial technical debt, high operational costs, and frequent data synchronization issues. AWS has recently highlighted a more streamlined alternative: a unified pipeline architecture utilizing Apache Iceberg and Amazon Managed Service for Apache Flink. This approach allows teams to process real-time data directly from their data lakes without the overhead of redundant infrastructure, marking a pivotal moment in the evolution of cloud-native data strategies.

The Historical Context: The Rise and Fall of the Dual-Pipeline Model

To understand the significance of this unified approach, one must examine the history of data processing architectures. In the early 2010s, the "Lambda Architecture" became the industry standard. It was designed to handle massive quantities of data by providing a "speed layer" for low-latency results and a "batch layer" for comprehensive, accurate historical views. While revolutionary at the time, the Lambda Architecture required developers to maintain two separate codebases and two different sets of infrastructure.

By the mid-2020s, the limitations of this model became a primary pain point for Chief Technology Officers. The dual-pipeline approach creates three fundamental problems: excessive infrastructure costs, as companies pay for duplicate compute and storage; operational complexity, requiring engineers to manage two different monitoring and alerting systems; and data inconsistency, where the "real-time" view often drifts from the "batch" view due to different processing logic. The introduction of open-source table formats like Apache Iceberg has finally provided the technological foundation necessary to collapse these two paths into a single, cohesive stream.

The Technical Foundations of the Unified Architecture

The cornerstone of this new architectural pattern is the Apache Iceberg table format. Iceberg is an open table format for huge analytic datasets, designed to bring the reliability and simplicity of SQL tables to big data. Unlike traditional Hive-based data lakes, Iceberg uses a snapshot-based architecture.

In this unified model, snapshots function similarly to commits in a version control system like Git. Every time data is written to an Iceberg table, a new snapshot is generated. This snapshot points to the new data files while maintaining references to the existing ones. Amazon Managed Service for Apache Flink leverages these snapshots to perform incremental reads. Instead of scanning an entire S3 bucket, the Flink application identifies only the changes between snapshots—specifically the new files that have arrived since the last checkpoint.

This mechanism ensures Atomicity, Consistency, Isolation, and Durability (ACID). In a practical business scenario, such as a retail giant processing 10,000 transaction records, ACID transactions ensure that a streaming query sees either the entire set of records or none at all. This prevents the "partial data" problem that historically plagued real-time analytics and led to skewed financial reporting.

Core Components of the AWS Integration

The implementation of a unified pipeline involves four primary AWS services and a suite of open-source libraries. The workflow begins with data landing in Amazon Simple Storage Service (S3) formatted as Apache Iceberg files. The metadata and schema for these files are managed by the AWS Glue Data Catalog, which acts as the central repository for table definitions.

Building unified data pipelines with Apache Iceberg and Apache Flink | Amazon Web Services

Amazon Managed Service for Apache Flink serves as the processing engine. It is configured to monitor the Iceberg snapshots at a specified interval. The technical complexity of this integration is managed through several critical Java Archive (JAR) dependencies, including the flink-s3-fs-hadoop connector and the iceberg-flink-runtime. These libraries allow Flink to communicate across different layers of the stack—coordinating between S3 for storage, Glue for metadata, and Hadoop for file-level operations.

Industry experts note that the choice of monitor-interval is a critical economic and performance lever. A three-second interval provides near-instantaneous data availability but can generate upwards of 1,200 Amazon S3 LIST API calls per hour. At current pricing models, this equates to roughly $0.04 per month per table. While this seems negligible for a single table, at an enterprise scale with thousands of tables, these costs must be managed by adjusting intervals based on the specific time-sensitivity of the workload.

Economic Analysis and Cost Management

One of the primary drivers for adopting a unified pipeline is the reduction in Total Cost of Ownership (TCO). Traditional streaming architectures often involve high fixed costs for "always-on" clusters. In contrast, the AWS-managed Flink environment charges based on Kinesis Processing Units (KPUs), with a standard rate of approximately $0.11 per hour per KPU.

By consolidating into a single pipeline, organizations can reduce their compute footprint by an estimated 30% to 50%. Furthermore, the use of Amazon S3 Intelligent-Tiering for the underlying Iceberg data files can optimize storage costs. Since data in a unified pipeline typically follows a predictable access pattern—frequent access for recent snapshots and rare access for historical data—Intelligent-Tiering automatically moves older data to lower-cost tiers, potentially saving another 20% on storage overhead.

However, batch processing still holds an economic advantage for certain use cases. If a dataset only needs to be processed once a day or if the queries are primarily focused on long-term historical trends, the continuous runtime of a Flink application may be less cost-effective than a scheduled AWS Glue ETL job. The industry consensus is that the unified streaming pattern is most effective for scenarios requiring data availability within seconds to minutes, such as fraud detection, real-time inventory management, or dynamic pricing engines.

Security Protocols and Shared Responsibility

As with all cloud architectures, security remains a shared responsibility. AWS manages the security of the underlying infrastructure, while the user is responsible for securing the data and access paths. In a unified Iceberg pipeline, this involves a multi-layered security strategy.

First, Identity and Access Management (IAM) roles must be scoped to the principle of least privilege. This means the Flink application should only have s3:GetObject and s3:PutObject permissions for the specific data lake bucket and glue:GetTable permissions for the relevant database.

Second, encryption is mandatory for enterprise-grade deployments. Server-side encryption with AWS Key Management Service (SSE-KMS) ensures that data at rest is protected, while enforced TLS (Transport Layer Security) via S3 bucket policies ensures data in transit cannot be intercepted.

Building unified data pipelines with Apache Iceberg and Apache Flink | Amazon Web Services

Finally, the use of Amazon Virtual Private Cloud (VPC) endpoints allows the Flink cluster to communicate with S3 and Glue over the private AWS network, bypassing the public internet entirely. This significantly reduces the attack surface and is a requirement for most compliance frameworks, such as SOC2 or HIPAA.

Operational Excellence and Performance Tuning

Transitioning to a production-ready unified pipeline requires meticulous performance tuning. Partition pruning is the most effective way to optimize query performance in an Iceberg-based system. By partitioning data by date or region, the Flink application can skip entire directories of irrelevant data, drastically reducing I/O overhead.

Checkpointing is another vital operational component. In Apache Flink, checkpointing provides "exactly-once" processing semantics, ensuring that even if a system failure occurs, no data is lost or duplicated. For moderate volumes—up to 10,000 records per second—a 10-second to 30-second checkpoint interval is generally recommended. If the checkpoint duration begins to exceed 50% of the interval, it serves as a leading indicator that the system is under-provisioned and requires additional KPUs or increased parallelism.

The Broader Impact on Enterprise Data Strategy

The move toward a unified pipeline architecture represents more than just a technical upgrade; it is a fundamental shift in how businesses interact with their data. By removing the lag between data ingestion and availability, companies can move from reactive to proactive decision-making.

In the retail sector, this allows for "just-in-time" inventory updates that prevent stockouts during peak shopping periods. In financial services, it enables more sophisticated fraud detection models that can analyze transaction patterns against historical data in a single, unified stream.

Furthermore, the adoption of open-source formats like Apache Iceberg prevents "vendor lock-in." Because the data is stored in an open format on S3, organizations retain the flexibility to use different processing engines in the future, whether they be Amazon Athena for ad-hoc SQL queries or Amazon EMR for heavy-duty machine learning workloads.

Conclusion and Future Outlook

The convergence of streaming and batch processing into a single, Iceberg-backed pipeline on AWS marks the end of the dual-pipeline era. By eliminating the redundancy of the Lambda Architecture, enterprises can achieve higher data consistency, lower operational costs, and faster time-to-insight. As Amazon Managed Service for Apache Flink continues to evolve, we can expect further integrations that simplify the deployment of these complex systems.

For data engineering teams, the path forward involves a transition from managing infrastructure to managing data logic. The technical barriers that once necessitated separate pipelines have been dismantled by the snapshot capabilities of Iceberg and the managed scalability of AWS. The result is a more agile, cost-effective, and reliable data ecosystem that is better equipped to handle the demands of the modern digital economy. Organizations that embrace this unified approach today will likely find themselves at a significant competitive advantage as the volume and velocity of global data continue to accelerate.

]]>
https://whatvis.com/unifying-data-lake-architectures-with-apache-iceberg-and-amazon-managed-service-for-apache-flink-to-eliminate-dual-pipeline-inefficiencies/feed/ 0