← Netflix Interview Insights

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

SeniorPrefer not to say
Jun 2026Remote

Summary

Netflix system design round focused on ads serving infrastructure. The bulk of the session was standard pipeline stuff but the interviewer kept pushing hard on budget pacing, which turned into a pretty deep rabbit hole.

Questions Asked (4)

Q1

Design an end-to-end ads serving system, covering request flow, candidate generation, ranking and auction mechanics, pacing, attribution, and billing.

System DesignData Modeling
Author's notes

I'd done this kind of question before so the skeleton came out fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then walk through the high-level architecture from ad request to billing. Dive into each component—candidate generation, ranking, auction, pacing, attribution, and billing—explaining trade-offs and how they integrate. Emphasize Netflix's unique context (e.g., ads on a subscription platform, focus on user experience).

Pro tip: Netflix is new to ads, so highlight how you'd balance ad revenue with subscriber experience—e.g., limiting ad load, ensuring relevance, and avoiding disruption. Also, discuss how you'd leverage Netflix's existing data and infrastructure for targeting and measurement.

1. Clarify Requirements and Scale

Ask about expected QPS, ad types (video, display), targeting capabilities, latency requirements, and business goals. Establish assumptions for the design.

2. High-Level Architecture

Outline the end-to-end flow: ad request from client, ad server, candidate generation, ranking, auction, ad selection, rendering, and tracking. Mention key components like ad server, targeting service, pacing service, attribution service, and billing service.

3. Deep Dive into Core Components

Explain candidate generation (e.g., targeting, retrieval), ranking (e.g., ML models, features), auction mechanics (e.g., second-price, reserve), and pacing (e.g., budget smoothing). Discuss trade-offs and scalability.

4. Attribution and Billing

Describe how to track ad events (impressions, clicks, conversions) and attribute them to the correct ad campaign. Explain billing models (CPM, CPC, CPA) and how to ensure accurate and timely billing.

5. Wrap Up with Trade-offs and Netflix Context

Summarize key design decisions, discuss potential bottlenecks, and tailor to Netflix's needs (e.g., integration with existing microservices, personalization, ad load management).

Key Points to Mention

  • Candidate generation: targeting (demographic, behavioral, contextual) and retrieval from ad inventory.
  • Ranking: machine learning models (e.g., pCTR, pCVR) and feature engineering.
  • Auction mechanics: second-price auction, reserve pricing, and bid shading.
  • Pacing: budget pacing algorithms (e.g., throttling, probabilistic pacing) to evenly spend budgets.
  • Attribution: multi-touch attribution, conversion tracking, and deduplication.
  • Billing: event logging, aggregation, invoicing, and reconciliation with advertisers.

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

Q2

How would you implement frequency capping so a user doesn't see the same ad more than N times within a configurable time window?

System DesignTechnical Trade-offs
Author's notes

Went straight to Redis sliding window counters and talked through the latency tradeoff.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: define N, the time window, and whether capping is per user, per ad, or per campaign. Then propose a scalable, low-latency solution using a distributed store like Redis with TTL-based counters, and discuss trade-offs between accuracy, memory, and performance.

Pro tip: Mention that frequency capping should be enforced at ad-serving time with a fast read, and that you'd use a sliding window or token bucket to avoid bursty behavior at window boundaries. Also highlight the need for graceful degradation if the store is unavailable.

1. Clarify requirements and constraints

Ask about N, window duration, whether capping is per user, per ad, or per campaign, and the expected scale (QPS, number of users). Confirm latency and accuracy requirements.

2. Choose a data model and storage

Propose a key structure like user_id:ad_id with a counter and TTL. Use a distributed in-memory store (e.g., Redis) for low-latency reads/writes, and consider sharding by user_id for scalability.

3. Implement the counting mechanism

Use atomic increments (e.g., INCR) with expiration to track views. For sliding windows, use a sorted set of timestamps or a token bucket. Ensure atomicity to avoid race conditions.

4. Enforce capping at ad-serving time

Before serving an ad, check the counter; if it exceeds N, skip the ad. This check must be fast and part of the critical path, so optimize for read performance.

5. Address trade-offs and edge cases

Discuss trade-offs: fixed vs. sliding window, memory vs. accuracy, and handling of store failures (e.g., fail-open or fail-closed). Mention monitoring and configurable parameters.

Key Points to Mention

  • Use of Redis or similar in-memory store with TTL for automatic expiration.
  • Atomic operations (INCR, EXPIRE) to prevent race conditions in distributed environments.
  • Sliding window vs. fixed window trade-offs: sliding window is more accurate but uses more memory.
  • Scalability considerations: sharding by user ID, read replicas, and caching.
  • Graceful degradation: if the store is down, decide whether to fail open (show ad) or fail closed (don't show ad).
  • Configurability: make N and window duration dynamically configurable without redeployment.

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

Q3

A campaign has a daily budget. How do you ensure it gets spent smoothly throughout the day rather than exhausting the budget in the first few hours?

System DesignTechnical Trade-offsPricing & Monetization
Author's notes

This was the one that ate the most time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as a real-time budget pacing system that controls spend rate using feedback loops and throttling mechanisms. Discuss how you would monitor spend, compare against a target pace, and adjust ad delivery dynamically to avoid early exhaustion while maximizing value.

Pro tip: Emphasize the trade-off between smooth pacing and opportunity cost—sometimes it's better to spend faster if high-value impressions are available, so incorporate a value-based pacing strategy rather than purely time-based.

1. Define pacing goal and metrics

Clarify that the goal is to spend the daily budget evenly over the day, but also consider business objectives like maximizing conversions or ROI. Define key metrics: spend rate, budget utilization, and pacing error.

2. Design a feedback control loop

Implement a controller that continuously compares actual spend against a target spend curve (e.g., linear or front-loaded). Use the difference to adjust the bid or throttle ad delivery in real-time.

3. Choose throttling mechanisms

Decide between probabilistic throttling (randomly dropping requests), bid modification (lowering bids to reduce win rate), or budget caps per time window. Each has trade-offs in terms of latency, accuracy, and system complexity.

4. Handle system constraints and scale

Ensure the solution works at Netflix scale: low-latency decisions, distributed counters, and fault tolerance. Consider using a distributed rate limiter or a centralized pacing service with local caching.

5. Monitor and adapt

Continuously monitor pacing performance and adjust parameters. Use A/B testing to compare pacing strategies and incorporate machine learning for predictive pacing based on historical data.

Key Points to Mention

  • Real-time budget pacing algorithms (e.g., PID controllers, token buckets)
  • Trade-offs between smooth pacing and maximizing campaign performance
  • Distributed systems challenges: consistency, latency, and scalability
  • Probabilistic throttling vs. bid shading vs. budget caps
  • Feedback loops and control theory in ad delivery
  • Netflix's scale and the need for efficient, low-latency solutions

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

Q4

Walk through the telemetry and billing pipeline for an ads system. How do you ensure accurate spend tracking and attribution?

System DesignData Modeling
Author's notes

Shorter part of the conversation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and scale of the ads system, then walk through the end-to-end pipeline from event ingestion to billing, emphasizing exactly-once processing and idempotency. Highlight how you ensure accuracy through reconciliation, auditing, and attribution modeling, and discuss trade-offs between latency and correctness.

Pro tip: Emphasize the importance of idempotent writes and deterministic aggregation to avoid double-counting, and mention how you'd handle late-arriving events with watermarks and reprocessing. Also, discuss how you'd design for auditability and explainability to build trust with advertisers.

1. Clarify Requirements and Scale

Ask about expected event volume, latency requirements, and accuracy guarantees. Understand the types of ads (e.g., display, video) and attribution models (e.g., last-click, multi-touch).

2. Design Data Ingestion and Processing

Describe how events are collected (e.g., client-side beacons, server-side logs), ingested into a durable queue (e.g., Kafka), and processed with stream processing (e.g., Flink) for real-time aggregation. Ensure exactly-once semantics via idempotent producers and transactional sinks.

3. Implement Attribution and Spend Calculation

Explain how you join ad impressions/clicks with conversion events, apply attribution rules, and compute spend per advertiser. Use windowing and watermarks to handle late data, and store results in a scalable database (e.g., Cassandra, BigQuery).

4. Ensure Accuracy and Reconciliation

Describe reconciliation jobs that compare real-time aggregates with batch reprocessing, and auditing mechanisms to detect discrepancies. Implement idempotent billing writes and maintain an immutable ledger for financial integrity.

5. Address Failure and Scalability

Discuss how the system handles failures (e.g., retries, dead-letter queues), scales horizontally, and supports backfills. Mention monitoring, alerting, and SLAs for data freshness and accuracy.

Key Points to Mention

  • Exactly-once processing and idempotency to prevent double-counting
  • Use of watermarks and allowed lateness for late-arriving events
  • Attribution models (last-click, multi-touch) and their implementation
  • Reconciliation between real-time and batch pipelines for accuracy
  • Immutable ledger and audit trails for billing integrity
  • Scalability and fault tolerance via distributed systems (Kafka, Flink, etc.)

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