Design Yelp Ads Click Billing With Daily Budget Pacing
Last updated: November 29, 2026
Quick Overview
Design the system that records clicks on sponsored business listings, charges advertisers per click exactly once, and paces spending so each advertiser's daily budget is spread across the day without large overspend.
Yelp
November 29, 20260
0
0 solved
Design the system that records clicks on sponsored business listings, charges advertisers per click exactly once, and paces spending so each advertiser's daily budget is spread across the day without large overspend.
Most of Yelp's revenue comes from local businesses buying cost per click advertising, often with small monthly budgets that owners watch closely. The interviewer is checking ledger correctness (no double charging), fraud filtering, and how serving decisions use near real time spend without a slow synchronous check on every ad request.
What the Interviewer Expects
- Separate the serving path (fast eligibility) from the billing path (durable ledger)
- Deduplicate clicks with idempotent click ids
- Use an append only ledger and derived balances
- Implement pacing with spend rate targets, not just a hard cap
- Filter invalid clicks and support refunds
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How much overspend is acceptable, and how do you bound it?
- How would you handle a time zone where the business's day resets?
- How do you refund clicks later detected as fraudulent?
- How would you reconcile the ledger with the payments system monthly?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: ad server picks sponsored listings for a search; a click is recorded and charged at the auction price; advertisers have daily and monthly budgets; dashboards show spend; invalid clicks are...
High-Level Design
Ad serving: the ad server reads each campaign's state (eligible, pacing multiplier) from an in memory cache refreshed every few seconds. Click path: the result link goes through a click redirect ser...