Design a Multi-Organization Advertising Platform with Performance Statistics
Company: Digitalocean
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design an advertising platform that displays ads from multiple organizations and collects statistics to compare which ads perform better or worse.
### Constraints
Ad formats, selection policy, traffic, billing, targeting, and the definition of performance are unspecified. Clarify the required features before adding auctions or personalization. Preserve organization boundaries and distinguish a valid ad display from a raw request or duplicate event.
### Clarifying Questions
- Which organizations can create and manage ads, and what approval or eligibility rules apply?
- What counts as an impression, click, conversion, or other success event?
- Is performance compared by raw counts, rates, revenue, or another objective?
- How are duplicate, delayed, or invalid events handled?
```hint Compare rates with their denominators
An ad with more clicks may simply have received more exposure; the event definitions and opportunity counts matter.
```
### What a Strong Answer Covers
- Ad and organization management, eligible-ad serving, and clear event instrumentation.
- Durable collection, deduplication, aggregation, and tenant-aware reporting.
- Correct performance interpretation, delayed data, and separation of association from causal impact.
### Follow-up Questions
- How would you reconcile a click that arrives before its impression event?
- What experiment would support a causal claim that one ad performs better?
Overview: Design ad management, serving, event collection, deduplicated statistics, and fair performance comparisons across organizations and campaigns.