← Netflix Interview Insights

Netflix·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Apr 2026

Summary

Netflix system design round focused entirely on ad platform data modeling. One long question, lots of depth expected, and I felt the pressure of having to cover schema design, constraints, and query patterns all in one go.

Questions Asked (1)

Q1

Design the entity schema for an ad platform from top to bottom: Account, Advertiser, Campaign, Ad Group, Creative, and event-level data like impressions and clicks. Cover fields, primary keys, foreign keys, constraints like budget caps and targeting rules, and explain how the schema supports targeting, bidding, billing, and reporting.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

This is a beast of a question and I underestimated how far they wanted me to go.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the hierarchical entity model (Account → Advertiser → Campaign → Ad Group → Creative) and then detail each entity's fields, keys, and constraints. Explain how the schema supports core ad platform functions: targeting, bidding, billing, and reporting, emphasizing trade-offs between normalization and performance.

Pro tip: Demonstrate awareness of scale by discussing partitioning and indexing strategies for event data, and mention how Netflix's unique ad model (e.g., ad-supported tier, content sponsorship) might influence schema design.

1. Define the Entity Hierarchy and Relationships

Outline the top-down structure: Account owns Advertisers, Advertisers own Campaigns, Campaigns own Ad Groups, Ad Groups own Creatives. Specify primary and foreign keys for each relationship.

2. Detail Fields and Constraints for Each Entity

For each entity, list essential fields (e.g., IDs, names, status, timestamps) and constraints like budget caps (daily, lifetime), targeting rules (JSON or separate tables), and bidding strategies.

3. Model Event-Level Data (Impressions, Clicks)

Design fact tables for impressions and clicks with foreign keys to Ad Group, Creative, and User/Device. Include fields like timestamp, cost, and interaction type. Discuss partitioning by date and indexing for query performance.

4. Explain Support for Targeting, Bidding, Billing, and Reporting

Describe how the schema enables targeting (via targeting rules tables), bidding (bid amounts and strategies at Ad Group level), billing (aggregating costs from events and applying budget caps), and reporting (joining fact tables with dimensions for analytics).

5. Discuss Trade-offs and Scalability

Address normalization vs. denormalization for read performance, use of columnar storage for analytics, and strategies for handling high-volume event data (e.g., sharding, time-series databases).

Key Points to Mention

  • Primary keys (e.g., account_id, advertiser_id) and foreign key relationships ensuring referential integrity.
  • Budget constraints: daily and lifetime caps at Campaign and Ad Group levels, with enforcement mechanisms.
  • Targeting rules: flexible schema (e.g., JSON columns or separate tables) for demographics, interests, and content context.
  • Bidding: bid amount, bid strategy (CPM, CPC, CPA) stored at Ad Group level, with auction logic.
  • Event data: impressions and clicks tables with timestamps, user/device IDs, cost, and partitioning for scalability.
  • Reporting: star schema with fact tables (events) and dimension tables (entities) for efficient aggregation and analysis.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.