Design a Real-Time Bidder That Answers Exchanges Within 100 Milliseconds
Last updated: November 29, 2026
Quick Overview
Design the bidding service of a demand-side platform that receives OpenRTB bid requests from many exchanges at several million queries per second, decides whether and how much to bid for one of thousands of campaigns, and responds within the exchange timeout.
StackAdapt
November 29, 20260
0
0 solved
Design the bidding service of a demand-side platform that receives OpenRTB bid requests from many exchanges at several million queries per second, decides whether and how much to bid for one of thousands of campaigns, and responds within the exchange timeout.
The bidder is the core of StackAdapt's platform: every impression across native, display, video and CTV passes through it, and a late response is the same as no bid. The round checks latency budgeting, in-memory data design, state shared across a fleet, and safety for real advertiser money.
What the Interviewer Expects
- Breaks the 100 ms budget into network, parse, filter, score and respond phases
- Keeps campaign and targeting state in memory on each bidder, refreshed asynchronously
- Handles budget and frequency state shared across hosts with bounded overspend
- Uses load shedding and early no-bid under overload
- Logs bids and wins for billing, reporting and model training off the hot path
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 do you prevent a campaign from overspending its daily budget by 20 percent across 500 hosts?
- An exchange doubles traffic without warning; what happens?
- How do you roll out a new CTR model safely?
- Where would you put the bidders geographically and why?
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: accept bid requests, filter eligible campaigns by targeting, frequency and budget, predict value, return a bid price and creative or a no-bid. Record wins and impressions. Non-functional: ...
High-Level Design
Exchanges hit regional load balancers that route to stateless bidder hosts (Go suits this: cheap goroutines, predictable GC). Each host holds an in-memory snapshot of active campaigns, creatives and a...