Question
Design an ad click-through-rate (CTR) prediction system for an ad exchange. For each ad request you must score candidate ads and pick the auction winner within ~20ms p99 at ~100k requests/sec. The predicted CTR (and predicted conversion rate) directly sets the bid in the auction, so probabilities must be well-calibrated, not just well-ranked. Features include user, context, and ad-creative signals, many of them high-cardinality and sparse (ad IDs, publisher IDs, user segments). New ads appear continuously and must start serving without weeks of history, and there's strong feedback: you only observe clicks on ads you chose to show.
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.