Cloud Analytics

How Delivery Hero Transformed Its Advertising Measurement Infrastructure Through Real-Time Streaming Analytics

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 by a specialized engineering team, addresses the critical requirement of balancing billing accuracy with the sub-second data freshness necessary for modern programmatic advertising. Operating in over 65 countries across Asia, Europe, Latin America, the Middle East, and North Africa, Delivery Hero serves as a massive marketplace, connecting 1.5 million restaurant partners and vendors with a global consumer base. In 2025, the company’s advertising revenue reached approximately EUR 1.5 billion, a figure that underscores the commercial necessity of an error-free, high-throughput measurement engine.

The Limitations of Legacy Batch Processing

Prior to this migration, Delivery Hero relied on a batch-oriented measurement system that processed impression, click, and order events in one-hour increments. While this model was sufficient during the early stages of the platform’s growth, it encountered significant structural bottlenecks as the volume of events scaled into the billions per day. The core issue was the reliance on processing time rather than event time. Because many events arrived at the system without standardized timestamps, the legacy pipeline bucketed data based on when it was ingested. This created a consistent lag, with the average gap between an event occurring and being recorded reaching approximately 61 minutes.

This latency prevented the advertising server from effectively pacing budgets or reacting to ad performance in real time. Furthermore, the system utilized synchronous API calls for data enrichment—the process of attaching campaign metadata, product information, and vendor ownership to raw events. During high-traffic periods, such as seasonal sales or "back-to-school" surges, these blocking calls created a cascade of connection pool exhaustion, causing instability across the billing, reporting, and ad-serving layers. The underlying database, a NoSQL document store, was ill-suited for the continuous deduplication and rolling aggregation required for ad attribution, leading to high read/write amplification and frequent performance degradation at peak loads.

The Chronology of the Transition

The engineering team, including Kirill Tishenkov, Alexandru Pisarenco, Upendra Kambhampati, and Sabariesh Ganesan, identified three non-negotiable requirements for the new architecture: absolute fault tolerance, stateful stream processing capable of retaining multi-day interaction history, and a fully managed infrastructure to minimize operational overhead.

The transition began with an evaluation of Apache Flink, which the team selected for its native event-time watermark model and its ability to handle out-of-order events—a common occurrence in distributed global networks. By selecting Amazon Managed Service for Apache Flink, the team bypassed the need to self-manage complex infrastructure such as JobManagers and TaskManagers, opting instead for a managed environment that allowed them to focus on business logic.

The implementation phase leveraged Amazon Kinesis Data Streams as the backbone for event ingestion, choosing it over Amazon MSK for its superior cost-to-performance ratio in their specific topology. To facilitate a rapid Minimum Viable Product (MVP), the team utilized Amazon EventBridge Pipes to bridge Amazon Simple Queue Service (SQS) to Kinesis without writing custom integration code, successfully cutting the time-to-production by two weeks. Throughout 2025, the pipeline was iteratively hardened, moving from MVP to a production-grade service running on AWS Fargate, capable of handling tens of thousands of messages per second.

Architectural Innovations and Data Integrity

The newly deployed architecture functions as a five-stage Java-based pipeline. It begins with ingestion, where user event actions and order events are received and buffered. The pipeline then performs decryption, deduplication, enrichment, attribution, and aggregation. A critical innovation in this design is the use of Amazon DynamoDB for reference data, accessed through Flink’s Async I/O API. This allows the system to enrich events without blocking the ingestion pipeline, effectively decoupling the enrichment process from the event flow.

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

The system ensures "effectively exactly-once" billing. While the underlying transport layers like Kinesis operate on an at-least-once delivery basis, the deduplication stage within the Flink pipeline drops any events replayed during recovery. This ensures that even if a system failure occurs, the billing metrics remain accurate. Furthermore, by persisting raw events in Avro format to Amazon S3 immediately upon arrival, the team has created a "replayable history." If a logic bug is discovered, the team can deterministically reprocess historical data, a feat that was virtually impossible under the previous, fragmented batch system.

Quantifiable Performance Gains

The impact of this infrastructure migration has been profound, yielding measurable improvements across four key performance indicators: latency, cost, reliability, and data quality.

The most dramatic improvement is in processing speed. The average time from event occurrence to recording has plummeted from 61 minutes to just 1.2 seconds. This near-instantaneous feedback allows Delivery Hero’s budget pacing and ad-serving systems to make decisions based on current performance rather than historical approximations. Financially, the migration has been equally successful, reducing monthly operational costs by approximately 57 percent compared to the legacy model.

Data quality metrics have seen similar gains. In the legacy system, 30 to 40 percent of sessions were missing context, and 91 percent of impression timestamps were unreliable. Following the migration, the rate of missing session data dropped to 0 percent, and missing impression timestamps were reduced to 0.2 percent. These improvements provide a cleaner data set for machine learning models, which are now able to ingest session-scoped features for more accurate campaign ranking and conversion-rate estimation.

Broader Implications for Advertising Tech

The success of Delivery Hero’s migration offers a blueprint for other high-scale advertising platforms currently struggling with the transition from batch to stream processing. By moving away from document-centric databases toward stateful stream processing with RocksDB, the company has effectively solved the "read/write amplification" problem that plagues many legacy ad-tech stacks.

The broader implication of this transition is the normalization of real-time intelligence in retail media. As delivery platforms continue to integrate advertising deeper into the user experience, the ability to perform sub-second attribution is becoming a competitive necessity rather than a luxury. This infrastructure not only supports immediate billing and pacing needs but also serves as a foundation for advanced AI use cases. The team at Delivery Hero has already signaled that this pipeline will act as the data backbone for future personalization ranking models and grounded Large Language Model (LLM) recommendations.

Conclusion and Future Outlook

The migration conducted by Delivery Hero illustrates that operational complexity and high-performance streaming are not mutually exclusive when paired with the right cloud-native tooling. By combining Amazon Kinesis for ingestion, Flink for processing, and DynamoDB for enrichment, the team has created a self-healing system that is significantly more resilient than its predecessor.

The project stands as a testament to the maturation of managed streaming services. As the advertising industry moves toward increasingly granular and real-time models of engagement, the ability to maintain "exactly-once" accuracy at scale will remain the standard by which all measurement platforms are judged. For Delivery Hero, the path forward involves extending this architecture to additional ad formats and further tightening the integration between real-time analytics and the ad-serving layer. As these technologies continue to evolve, the distinction between "data processing" and "business action" will continue to blur, allowing platforms like Delivery Hero to operate with unprecedented precision in a global marketplace.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button