Design a high-throughput ad exchange
Company: Roku
Role: Backend Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design an ad exchange that handles roughly 175,000 bid requests per second.
Publishers send impression opportunities to the platform, and demand-side bidders respond with bids. The system should:
- receive and validate bid requests,
- enrich requests with user, device, and context data,
- identify eligible campaigns or external bidders,
- run an auction under a strict latency budget,
- return the winning ad,
- enforce pacing, budget limits, and frequency caps,
- log impressions, clicks, and billing events for analytics and reconciliation.
Discuss the API shape, core components, storage choices, partitioning strategy, fault tolerance, and the main consistency and latency trade-offs.
Quick Answer: This question evaluates a candidate's ability to design scalable, high-throughput, low-latency distributed backend systems for real-time ad exchanges, assessing competencies such as API shape, request validation and enrichment, auction flow, traffic partitioning, storage choices, fault tolerance, and operational event logging.