Design Ad Budget Pacing That Never Overspends an Advertiser's Daily Cap
Last updated: November 29, 2026
Quick Overview
Design the system that paces Meta ad delivery so each campaign spends its daily budget smoothly across the day and never materially overspends, even though ad impressions are served from thousands of servers in many regions.
Meta
November 29, 20260
0
0 solved
Design the system that paces Meta ad delivery so each campaign spends its daily budget smoothly across the day and never materially overspends, even though ad impressions are served from thousands of servers in many regions.
Ads infrastructure is Meta's revenue engine, and budget pacing is a distributed quota problem with money attached. The interviewer is checking whether you can combine a throttle or bid-shading controller with distributed spend accounting, and reason about the cost of overspend (refunds, trust) against underdelivery.
What the Interviewer Expects
- Frame pacing as both a quota (hard cap) and a control problem (smooth spend)
- Design spend accounting that is fast to read on the auction hot path
- Explain how delayed billing events (clicks, conversions) create overspend risk
- Use a feedback controller such as a PID-like pacing multiplier
- Handle multi-region delivery and campaign edits mid-day
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
- What if the advertiser cuts their budget in half at 3 pm?
- How do you pace a campaign billed per click when clicks arrive minutes after impressions?
- How would you test a new pacing algorithm safely?
- How do you pace lifetime budgets that span weeks?
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: for each ad set with a daily budget , spend close to by end of day, spread roughly in line with available traffic (not all in the first hour), and never exceed it by more than a...
High-Level Design
Three parts. (1) Spend ledger: billing events stream (impressions, clicks) from ad servers into a streaming aggregator that maintains spend per ad set per day, the source of truth. (2) **Pacing co...