Skip to content

ONE QUESTION. YOUR REASONING.

Design an ad click aggregator

Design an ad click aggregator: users click ads and land on the advertiser’s site, and advertisers see click counts for each ad by the minute.

System designInfrastructure and platformSenior

YOUR BRIEF

What to work through

Work through an ad click aggregator as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Clicking an ad records the click and redirects to the advertiser’s site
  • Advertisers query clicks per ad over any time range, at 1-minute granularity
  • Queries can filter by dimensions such as country
  • Bonus: the 100 most clicked ads of the last minutes, refreshed every minute

BEFORE YOU START

Constraints to discuss

  • A peak of 10,000 clicks a second
  • Advertiser queries answer in under a second
  • No click lost, and none counted twice
  • Counts visible within a few minutes end to end, as close to real time as possible
Need a starting point?

Watch for these common gaps as you prepare:

  • Writing clicks and serving advertiser queries from the same database
  • A client-side redirect that lets users skip the tracking
  • Dedup by user id, or inside Flink windows
  • Writing the dedup cache before the stream, which can lose clicks
  • Proposing Flink checkpointing by default, or a time-series database for queries with many dimensions
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad serving system
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.