---
title: "The journey of building a comprehensive attribution platform"
description: "Grab's ads and promo attribution system evolved from a Kappa-architecture streaming engine to a Lambda architecture that pairs real-time stream processing with Spark batch jobs over S3."
url: "https://swe.quest/articles/the-journey-of-building-a-comprehensive-attribution-platform-5e6be9b52947e115"
canonical: "https://engineering.grab.com/attribution-platform"
source: "Grab Engineering"
published: "2024-02-20"
difficulty: "easy"
kind: "Case study"
reading_minutes: 8
tags: ["ads","stream-processing","data-pipelines","system-design"]
---

# The journey of building a comprehensive attribution platform

A post on [Grab Engineering](https://swe.quest/sources/grab.md), published 2024-02-20, 8 min read, Case study. Original: [https://engineering.grab.com/attribution-platform](https://engineering.grab.com/attribution-platform)

## Summary

Grab's ads and promo attribution system evolved from a Kappa-architecture streaming engine to a Lambda architecture that pairs real-time stream processing with Spark batch jobs over S3. The pure streaming design cut attribution latency from 2-3 days to minutes, but it struggled with processing cost, long attribution windows, out-of-order events and multi-touch models. Adding an offline batch layer gave historical context and fault tolerance, kept discrepancies under 1% and cut real-time processing costs by about 25%. To limit the cost of maintaining two codebases, Grab plans to reserve the real-time path for time-sensitive metrics such as cost-per-order budget capping and move all other reporting to batch.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Ads](https://swe.quest/tags/ads.md) (Domains)
- [Stream processing](https://swe.quest/tags/stream-processing.md) (Data & databases)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- stream processing basics ([easy posts on Stream processing](https://swe.quest/tags/stream-processing.md?difficulty=easy))
- batch ETL ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- Kafka ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

Kappa architecture, Lambda architecture, Kafka, Spark, Amazon S3, Druid, ScyllaDB, Coban

## Related posts

- [Rebuilding Guardian: How Pinterest Upgraded Its Real-Time Abuse Platform to Modern Infrastructure…](https://swe.quest/articles/rebuilding-guardian-how-pinterest-upgraded-its-real-time-abuse-platform-to-dda792e38f97dd45.md): Pinterest Engineering · 2026-11-16 · Medium · 12 min read · Stream processing, Analytics & OLAP, Threat detection, System design, Data pipelines
  Pinterest rebuilt Guardian, its real-time abuse detection platform, from a monolithic in-house system into a modular V2 that separates interactive analytics, continuous action evaluation and historical replay.
- [How AdGreetz Processes Millions of Daily Ad Impressions with ClickHouse Cloud](https://swe.quest/articles/how-adgreetz-processes-millions-of-daily-ad-impressions-with-clickhouse-cloud-923fb2f6799d75bf.md): ClickHouse · 2023-04-26 · Easy · 3 min read · Analytics & OLAP, Ads, Cost optimization, Serverless
  AdGreetz moved its ad impression analytics from AWS Athena to Snowflake and then to ClickHouse Cloud, citing roughly six times lower cost than a small Snowflake standard plan and sub-second rather than multi-second queries.
- [Scaling Shopify's BFCM Live Map: An Apache Flink Redesign](https://swe.quest/articles/scaling-shopify-s-bfcm-live-map-an-apache-flink-redesign-bcbe156fa7990bd0.md): Shopify Engineering · 2021-12-10 · Medium · 9 min read · Stream processing, Scaling, System design, Real-time systems
  Shopify scaled its Black Friday/Cyber Monday live sales map by putting Apache Flink in front of Cricket, its home-grown Go stateful streaming service.
- [How Shopify improved consumer search intent with real-time ML](https://swe.quest/articles/how-shopify-improved-consumer-search-intent-with-real-time-ml-15d46e89bc4248e9.md): Shopify Engineering · 2024-10-18 · Medium · 8 min read · Inference & serving, Stream processing, ML platforms, Search, Cost optimization
  Shopify generates about 2,500 text and image embeddings per second (216M/day) in near real time with Google Cloud Dataflow and Apache Beam's RunInference on T4 GPUs, feeding Storefront Semantic Search and a BigQuery warehouse.
- [How InMobi achieved 20x faster queries and 80% cost savings with ClickHouse](https://swe.quest/articles/how-inmobi-achieved-20x-faster-queries-and-80-cost-savings-with-clickhouse-7024c9110d80fdcc.md): ClickHouse · 2026-02-25 · Medium · 8 min read · Analytics & OLAP, Ads, Cost optimization, Data pipelines, Resilience
  InMobi moved its publisher-facing real-time ad reporting APIs from a serverless warehouse on blob storage to ClickHouse.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
