Cloud Analytics

Delivery Hero Transforms Global Ad Measurement with Real-Time Streaming Architecture

Delivery Hero, the Berlin-based global leader in local delivery platforms, has successfully transitioned its massive advertising measurement infrastructure from a legacy hourly batch-processing model to a high-throughput, real-time streaming architecture powered by Amazon Managed Service for Apache Flink. This technological shift, executed in collaboration with AWS engineering teams, addresses the critical need for sub-second data fidelity in a market where the company processes billions of ad events daily to support a revenue stream that reached nearly EUR 1.5 billion in 2025.

Operating across 65 countries in Asia, Europe, Latin America, the Middle East, and North Africa, Delivery Hero facilitates connections between 1.5 million restaurant partners and millions of active consumers. As the complexity of this ecosystem grew, the company’s existing data pipeline—reliant on batch processing and synchronous API calls—began to falter under the weight of tens of thousands of messages per second. The migration to Apache Flink represents a significant milestone in modernizing advertising technology, effectively cutting infrastructure costs by 57 percent while simultaneously solving long-standing issues related to data accuracy, latency, and system reliability.

The Structural Failures of the Legacy Environment

For years, Delivery Hero utilized a system that consumed impression, click, and order events from message queues, enriching them via blocking synchronous API calls before committing aggregated metrics to a document-oriented NoSQL database. While functional at smaller scales, this approach proved fundamentally incompatible with the demands of a high-velocity global ad platform.

The system suffered from five primary architectural flaws. First, it lacked event-time semantics, processing data based on the time of ingestion rather than the time of occurrence. This led to significant skews during periods of network latency or out-of-order delivery, complicating the calculation of Return on Ad Spend (ROAS). Furthermore, the 61-minute average processing delay rendered real-time budget pacing and ad serving impossible.

Second, the reliance on synchronous enrichment created a massive bottleneck. Every ad event triggered a chain of blocking API calls for metadata and product lookups. During peak traffic events, such as flash sales, these connection pools would exhaust, causing cascading failures across billing and reporting services.

Third, the storage layer was ill-suited for the workload. Originally designed for document storage, the database struggled with the continuous deduplication and multi-day attribution lookups required by the ad platform. This resulted in significant read/write amplification, where storage costs and query latency grew linearly with event volume, often leading to total system outages during high-load periods.

Fourth, the legacy infrastructure lacked a unified mechanism for data recovery. Reprocessing corrupted or missing data required a patchwork of manual CLI scripts, Google Cloud BigQuery tables, and separate Airflow jobs. This lack of a streamlined "replay" capability meant that data gaps were often permanent or required labor-intensive, cross-team coordination to rectify.

Finally, the best-effort nature of the legacy enrichment process resulted in data degradation. A substantial portion of events—specifically 30 to 40 percent of session data and 91 percent of impression timestamps—were left incomplete, which downstream machine learning models then inherited, leading to poor performance in campaign ranking and conversion-rate estimation.

The Technical Evolution: Implementing Apache Flink

To overcome these challenges, Delivery Hero’s engineering team established three non-negotiable requirements for their new platform: fault-tolerant processing, stateful stream processing capable of managing multi-day interaction histories, and a fully managed infrastructure to minimize operational overhead.

The transition centered on Amazon Managed Service for Apache Flink, chosen for its ability to handle event-time watermarking, which allows for the accurate reordering of events. To manage state efficiently, the team utilized Flink’s RocksDB state backend, which stores massive keyed states on disk, thereby avoiding the common pitfalls of Java Virtual Machine (JVM) heap pressure.

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

The new architecture utilizes Amazon Kinesis Data Streams as the upstream event bus, favored for its cost-efficiency. Amazon DynamoDB handles reference data, queried through Flink’s Async I/O API to ensure enrichment does not block the main processing pipeline. To ensure business continuity, every raw event is persisted in Avro format to Amazon S3 immediately upon arrival, creating a durable and replayable audit trail that serves as the foundation for both billing and analytical recovery.

Performance Gains and Quantitative Results

The impact of this architectural overhaul has been profound. Most notably, the average latency for event recording plummeted from 61 minutes to just 1.2 seconds. This transition allows the ad server and budget management systems to function on live data, facilitating immediate adjustments to campaign spend and placement.

Operational efficiency also improved dramatically. By replacing the fragile, synchronous enrichment chains with an elastic, asynchronous model, the pipeline can now sustain 20,000 messages per second during peak intervals without the risk of back-pressure leakage. The 57 percent reduction in monthly operational costs highlights the efficiency gains of transitioning from a resource-heavy, document-database-centric model to a streaming-native approach.

Data quality metrics demonstrate the most significant improvement. The "Missing Session Rate" dropped from an average of 35 percent to zero. Similarly, the incidence of missing customer IDs fell from 5 percent to a negligible 0.8 percent, and the critical failure rate for impression timestamps—previously a staggering 91 percent—was reduced to 0.2 percent. These improvements provide a stable foundation for the company’s machine learning models, which now consume high-fidelity, session-scoped features for conversion-rate estimation and anomaly detection.

Broader Implications for the Advertising Industry

The success of Delivery Hero’s migration offers a blueprint for other global enterprises struggling with the limitations of batch-based advertising measurement. As the advertising industry moves toward increasingly automated, AI-driven bidding environments, the ability to process events in real time has transitioned from a competitive advantage to a commercial imperative.

The shift also signals a broader trend in cloud-native engineering: the maturation of managed streaming services. By offloading the management of JobManagers and TaskManagers to AWS, Delivery Hero’s engineers have successfully pivoted their focus from maintaining infrastructure to developing sophisticated application logic. This allows for faster iteration cycles, which the team is already leveraging to extend the architecture to new ad formats and to integrate live user interaction streams into personalization and recommendation engines.

For the advertising industry at large, the takeaway is clear: the integration of event-time processing, durable state management, and asynchronous enrichment is no longer an experimental configuration but a proven standard. As Delivery Hero continues to refine its use of AI-driven campaign ranking and large language model (LLM) recommendations, the real-time pipeline established here serves as a necessary technological prerequisite.

Future Outlook and Strategic Expansion

Looking ahead, the platform’s evolution will focus on further reducing the distance between data collection and algorithmic execution. Plans are already underway to connect real-time Flink aggregations directly to the ad-serving layer for sub-second budget pacing. This will enable the system to react not only to individual impressions but to the cumulative state of an entire market, potentially transforming how Delivery Hero handles competitive bidding and inventory allocation.

Furthermore, the team’s ability to treat past data as a "first-class input"—made possible by the robust S3 and Kinesis replay mechanisms—means that future platform updates or model retraining will be significantly less risky. The capability to deterministically reprocess historical data allows for the continuous improvement of machine learning features without the fear of data corruption or reconciliation errors.

By choosing a managed, scalable, and event-driven architecture, Delivery Hero has effectively future-proofed its advertising measurement stack, turning a once-fragmented and delayed process into a seamless, high-velocity engine that supports the company’s broader mission of delivering essentials to millions of customers worldwide. The results confirm that for global platforms operating at this scale, the transition to real-time streaming is not just an infrastructure upgrade, but a fundamental prerequisite for sustained commercial growth and operational excellence.

Related Articles

Leave a Reply

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

Back to top button