Design an ads audience targeting system
Company: Netflix
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
## Problem
Design an **ads audience targeting system** that allows advertisers to upload large user lists and then target (or exclude) those users when serving ads.
### Requirements
- Advertiser can create **audiences** and upload membership data at large scale (e.g., millions to billions of identifiers).
- Support common identifiers: email/phone (hashed), mobile ad IDs, internal user IDs.
- Audience can be attached to ad groups/campaigns as **include** or **exclude** targeting.
- During ad serving, given a user request, the system must quickly determine which audiences the user belongs to (or whether the user matches an audience) to filter eligible ads.
- Handle incremental updates (add/remove users), audience expiration, and deletion.
### Non-functional requirements
- Low latency in serving path (typically single-digit milliseconds budget).
- High throughput for ingestion.
- Privacy/security: encryption, access control, audit logs, retention.
- Multi-tenant isolation across advertisers.
### Deliverables
Explain:
1. APIs and data flow for upload → processing → storage.
2. Storage/indexing approach for membership lookup at serving time.
3. How you scale ingestion and serving, and how you monitor correctness.
4. Tradeoffs (Bloom filters vs key-value lookup vs inverted index, batch vs streaming).
Quick Answer: This question evaluates skills in large-scale system design, data modeling for massive audience membership, low-latency lookup mechanisms, and operational concerns such as high-throughput ingestion, privacy/security, and multi-tenant isolation.