Design Budget Pacing and Click Billing for Google Ads
Last updated: November 29, 2026
Quick Overview
Design the system that keeps each advertiser's daily spend close to their budget across a global ad-serving fleet, and bills clicks accurately with invalid-click filtering.
0
0
0 solved
Design the system that keeps each advertiser's daily spend close to their budget across a global ad-serving fleet, and bills clicks accurately with invalid-click filtering.
Ads is Google's core revenue system, and budget control is a classic distributed-counting problem with money at stake. Interviewers check how you share budget state across thousands of servers without a central bottleneck and how you bound overspend.
What the Interviewer Expects
- Explains why global exact counting per auction is infeasible
- Designs local budget allocation with periodic sync
- Paces spend over the day rather than exhausting early
- Builds an exactly-once billing pipeline
- Handles invalid clicks and 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 do you allow, and who pays for it?
- How does pacing react to a sudden traffic spike?
- How do you handle a click that arrives hours after the impression?
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: advertisers set a daily budget per campaign; ad servers decide whether a campaign may enter each auction; clicks are recorded, filtered for invalid activity, and billed; reports show s...
High-Level Design
- Ad servers run auctions with a local in-memory view of each campaign's pacing state: remaining budget slice and a throttle probability.
- Spend events (clicks, or impressions for CPM) flow...