System design · Cases: ten designs, worked end to end

Design an ad click aggregator

An ad click aggregator has to redirect a user in milliseconds, count every click exactly once for billing, and answer per-minute questions about millions of ads, which means separating the fast path from the counting path and then deciding how much correctness to buy in the stream versus in a batch job behind it.

27 min read Full lesson in the app Patterns: tumbling-window, watermark, stream-plus-batch-reconciliation, key-salting

What you'll be able to do

Before this: kafka-and-event-streams, scaling-writes

Log in to read the rest of this lesson

An ad click aggregator has to redirect a user in milliseconds, count every click exactly once for billing, and answer per-minute questions about millions of ads, which means separating the fast path from the counting path and then deciding how much correctness to buy in the stream versus in a batch job behind it. This walkthrough runs about 27 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.

Log in to continue

The first module of every track is free to read on the web: see what's open in System design.