Problem
Design an ad click aggregation system that joins ad-serving events and user actions to compute dashboard metrics by ad, action, and region
- Buffer out-of-order user actions until matching ad attribution arrives without dropping unmatched events
- Enforce idempotent counting via a dedupe ledger to handle duplicates and replay-safe corrections
- Shard writes and isolate hot-key skew so viral ads do not stall processing for normal traffic
Key Test Points
- Stateful stream join
- Explicit dedupe boundary
- Partitioned rollups
Spot an issue or have a suggestion?