Question 21 of 30

Ads: Capture Interest, Show It Everywhere

hardOpen designCommonly asked~45 minHLD roundBar raiserHiring managerSenior / SDE-3MetaGoogleAmazonFlipkartMicrosoftSwiggyStreaming & Real-time DataStorage & Data ModellingCachingCapacity & Estimation

The question, as asked

“A user searches for running shoes in our app. Minutes later they're seeing running-shoe ads on other apps and sites. Design the system that makes that happen.”

Scope it before you design it

The prompt is vague on purpose. These are the clarifying questions a strong candidate asks first — answer them out loud before you touch the architecture.

  • Which side of the market are we? A publisher selling its own inventory, an advertiser-side DSP buying across the web, or the exchange in the middle. The three have different data, different latency budgets, and different money flows.
  • How fresh does interest have to be? 'Minutes' means a streaming profile pipeline. 'Next day' means a nightly batch job and a vastly cheaper system — make them say which, because it's the single biggest cost driver.
  • Scale, in numbers you'll reuse all round: DAU, interest events per user per day, and ad requests per second. Ask for all three up front.
  • What's the latency budget on an ad request? Real exchanges give you 100ms end to end including network. That constraint kills most naive designs, so get it stated early.
  • How is the advertiser billed — CPM, CPC, or CPA? This decides whether impression and click counting can be approximate or has to be exactly-once and auditable.
  • What's the consent and privacy regime? GDPR/DPDP consent, opt-outs, children, and prohibited categories like health or sexual orientation. A design that ignores this fails on the compliance question, not the scaling one.
  • 'All social media' — are we actually serving ads on other companies' properties? If so we're a DSP bidding into their exchanges, and the cross-site identity problem becomes the centre of the question, not a footnote.

Your answer, first

Commit something before anything unlocks. Saved on this device as you go.

0 charactersExpand for room to draw

Framework hint

Sketch or write your approach above first. The hint gives you the structure, not the answer.

Go deeper