← Netflix Interview Insights

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

SeniorPrefer not to say
Jun 2026Remote

Summary

Netflix system design round for a software engineering role. The whole thing was centered on one big problem: design an ad pacing system for a large-scale streaming platform. Dense, multi-layered, and honestly the kind of question where you realize halfway through how much surface area there actually is.

Questions Asked (7)

Q1

Design an advertising pacing system for a large-scale video streaming platform. Campaigns have budgets, flight dates, and delivery goals. The system receives millions of ad requests per second and must decide which campaigns are eligible to serve while spreading spend smoothly over the campaign lifetime rather than burning budget early.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one took me a few minutes to even scope properly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture that separates ad request handling from pacing logic. Focus on a distributed pacing service that uses probabilistic or token-bucket algorithms to control spend, and discuss trade-offs between accuracy and latency.

Pro tip: Emphasize the need for a feedback loop: pacing decisions should be based on real-time spend data, and consider using a hierarchical approach where local nodes make quick decisions while a central system periodically adjusts budgets.

1. Clarify Requirements and Scale

Ask about campaign types, budget sizes, delivery goals (e.g., even pacing vs. ASAP), and latency requirements. Confirm the scale: millions of ad requests per second, and the need for global coordination.

2. High-Level Architecture

Propose a system with an ad request handler that checks campaign eligibility and a pacing service that controls spend. Use a distributed cache for campaign metadata and a message queue for spend events.

3. Pacing Algorithm Design

Describe a pacing algorithm, such as token bucket or probabilistic thinning, that spreads budget over the flight. Discuss how to handle uneven traffic and ensure smooth delivery.

4. Data Model and State Management

Outline how to store campaign budgets, flight dates, and real-time spend. Consider using a time-series database for spend tracking and a distributed counter for budget consumption.

5. Trade-offs and Scalability

Discuss trade-offs between accuracy and latency, centralized vs. decentralized pacing, and how to scale horizontally. Mention monitoring and failure recovery.

Key Points to Mention

  • Token bucket or leaky bucket algorithms for smooth pacing
  • Distributed counter for real-time spend tracking (e.g., using Redis or a custom service)
  • Probabilistic eligibility checks to avoid over-serving
  • Feedback loop from spend data to adjust pacing rates
  • Handling of late-arriving spend events and eventual consistency
  • Trade-offs between strict budget enforcement and system latency

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

Q2

How do you prevent overspending when hundreds of serving nodes are all making spend decisions for the same campaign at the same time?

System DesignTechnical Trade-offs
Author's notes

The concurrency angle was where I felt most confident.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and constraints (e.g., hundreds of nodes, low-latency decisions, budget accuracy). Then propose a distributed architecture that combines a central budget authority with local caching and asynchronous reconciliation, and discuss trade-offs between consistency and availability.

Pro tip: Emphasize that perfect real-time coordination is impractical; instead, design for eventual consistency with safety margins and idempotent operations to handle race conditions gracefully.

1. Clarify Requirements and Constraints

Ask about budget granularity, acceptable overspend tolerance, latency requirements, and failure modes. This ensures your solution aligns with business needs.

2. Design a Central Budget Service

Propose a highly available, low-latency service that tracks remaining budget and atomically reserves spend for each decision. Use techniques like sharding by campaign and optimistic concurrency.

3. Implement Local Caching with Leases

Allow serving nodes to cache budget allocations (leases) from the central service, reducing round-trips. Nodes spend against their lease and request more when depleted.

4. Handle Reconciliation and Overspend

Use asynchronous reconciliation to adjust budgets based on actual spend. Implement safety margins (e.g., reserve 10% buffer) and idempotent spend records to prevent double-counting.

5. Discuss Trade-offs and Failure Handling

Compare consistency vs. availability (CAP), latency vs. accuracy, and describe fallback strategies (e.g., fail closed, degrade to conservative spending) during network partitions.

Key Points to Mention

  • Distributed consensus or coordination services (e.g., ZooKeeper, etcd) for leader election and atomic operations
  • Optimistic concurrency control with versioning or compare-and-swap to avoid race conditions
  • Lease-based budgeting: nodes request chunks of budget for a time window, reducing central load
  • Idempotency keys for spend events to ensure exactly-once processing during retries
  • Eventual consistency and reconciliation: periodic sync of actual spend vs. reserved amounts
  • Safety margins and overspend tolerance: design to slightly underspend rather than overspend
  • Monitoring and alerting for budget drift and anomalies

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

Q3

How do you handle nested budget scopes, where a single ad impression can count against an ad-group budget, a daily budget, and a lifetime campaign budget all at once?

System DesignData Modeling
Author's notes

Didn't handle this as cleanly as I wanted.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as scale, consistency needs, and latency. Then propose a data model that represents the budget hierarchy and an enforcement mechanism that atomically checks and updates all applicable budgets. Discuss trade-offs between strong consistency and performance, and how to handle edge cases like concurrent impressions.

Pro tip: Emphasize idempotency and atomicity: each impression must be counted exactly once across all budgets, even under failures or retries. Mention using a distributed transaction or a two-phase commit with a centralized budget service, and how you'd handle hot partitions.

1. Clarify Requirements

Ask about scale (impressions per second), consistency requirements (strong vs eventual), latency tolerance, and failure modes. Understand if budgets are hard limits or soft.

2. Design Data Model

Model budgets as a hierarchy (ad group -> daily -> campaign) with remaining amounts. Consider using a tree or parent-child references, and decide on storage (e.g., relational DB, Redis, or custom service).

3. Enforcement Mechanism

Propose an atomic check-and-decrement operation across all budgets. This could be a single service that locks all budgets, or a distributed transaction. Discuss using optimistic concurrency or a queue for serialization.

4. Handle Concurrency and Failures

Address race conditions with atomic operations or distributed locks. Ensure idempotency to avoid double-counting on retries. Plan for partial failures and rollback.

5. Scalability and Trade-offs

Discuss partitioning by campaign or ad group, caching, and asynchronous updates. Compare strong consistency (slower) vs eventual consistency (faster but risk overspend).

Key Points to Mention

  • Atomicity and idempotency: each impression must decrement all budgets exactly once.
  • Hierarchical data model with parent-child relationships and remaining budget fields.
  • Concurrency control: distributed locks, optimistic concurrency, or serialization via a queue.
  • Trade-offs between strong consistency (prevents overspend) and performance/latency.
  • Failure handling: retries, rollback, and reconciliation to avoid budget leaks.
  • Scalability: partitioning, caching, and asynchronous processing for high throughput.

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

Q4

The traffic forecast turns out to be badly wrong due to an unexpected spike. How does the pacing controller react, and what prevents over-delivery before the next control loop tick?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

Good follow-up that exposed a real gap in my design.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Explain that the pacing controller continuously monitors actual traffic against the forecast and adjusts the allowed request rate to avoid over-delivery. Emphasize that between control loop ticks, mechanisms like rate limiting, token buckets, and real-time feedback prevent sudden spikes from causing over-delivery.

Pro tip: Highlight that the controller must balance responsiveness with stability—overreacting to a spike can cause oscillation, so damping or hysteresis is often used. Also, mention that Netflix's adaptive concurrency limits and real-time telemetry are key to handling unexpected spikes.

1. Detect the spike

The pacing controller continuously compares actual traffic to the forecast and detects deviations via real-time metrics.

2. Adjust pacing rate

Upon detecting a spike, the controller reduces the allowed request rate to prevent over-delivery, often using a PID-like control algorithm.

3. Enforce limits between ticks

Between control loop ticks, rate limiters (e.g., token buckets) and concurrency limits enforce the current pacing rate, preventing bursts.

4. Incorporate feedback and damping

The controller uses feedback to avoid oscillation and may apply damping or hysteresis to stabilize adjustments.

5. Recover and re-forecast

After the spike, the controller gradually increases the rate as conditions normalize, and the forecast may be updated for future cycles.

Key Points to Mention

  • Control loop frequency and latency
  • Rate limiting algorithms (token bucket, leaky bucket)
  • Concurrency limits and adaptive concurrency
  • Real-time monitoring and feedback
  • Damping/hysteresis to prevent oscillation
  • Graceful degradation and fallback strategies

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

Q5

An advertiser cuts a campaign's daily budget in half mid-flight. How quickly does that change propagate to every serving node, and how do you prevent overspend during the propagation window?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

Shorter answer from me here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and latency requirements, then propose a push-based propagation system with a bounded propagation window. Explain how to prevent overspend using a combination of local budget enforcement and a global safety margin, and discuss trade-offs between consistency and availability.

Pro tip: Emphasize that overspend prevention is not just about fast propagation but also about designing the system to tolerate delays—e.g., by having serving nodes enforce a conservative local budget that is periodically refreshed. This shows you think about failure modes and real-world constraints.

1. Clarify Requirements and Constraints

Ask about the number of serving nodes, acceptable propagation latency, and the cost of overspend. This sets the stage for a tailored design.

2. Design Propagation Mechanism

Propose a push-based system (e.g., pub/sub or config service) to broadcast budget changes quickly, with a target propagation time (e.g., <1 second). Mention fallback to pull-based polling for reliability.

3. Prevent Overspend During Propagation

Describe local budget enforcement: each node tracks spend and enforces a conservative limit (e.g., 50% of new budget) until it receives the update. Use a global budget coordinator to monitor and adjust.

4. Handle Failures and Edge Cases

Discuss what happens if a node misses the update: it should eventually reconcile via periodic sync. Also consider network partitions and how to avoid double-spending.

5. Evaluate Trade-offs

Compare consistency vs. availability, latency vs. cost, and complexity vs. reliability. Explain why your design balances these for Netflix's scale.

Key Points to Mention

  • Push-based propagation (e.g., Kafka, Redis Pub/Sub) with low latency
  • Local budget enforcement with a safety margin to prevent overspend
  • Global budget coordinator for monitoring and reconciliation
  • Periodic sync to handle missed updates and network partitions
  • Trade-offs between consistency and availability (CAP theorem)
  • Idempotency and exactly-once semantics to avoid double-counting

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

Q6

One campaign accounts for a huge share of total spend and is concentrated in a single hot region. How do you pace it without that campaign's counter becoming a bottleneck for the whole serving fleet?

System DesignAlgorithms & Data Structures
Author's notes

Classic hot-key problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a distributed pacing architecture that shards the campaign's counter across multiple nodes or uses a hierarchical aggregation to avoid a single point of contention. Discuss trade-offs between accuracy and scalability, and explain how to handle hot regions with techniques like local pacing and asynchronous synchronization.

Pro tip: Emphasize that pacing is about controlling the rate of spend, not just counting; consider using a token bucket or leaky bucket algorithm with distributed tokens to smooth traffic and prevent overload. Also, mention the importance of monitoring and adaptive throttling to handle sudden spikes.

1. Clarify Requirements and Constraints

Ask questions to understand the scale, latency requirements, accuracy needs, and failure tolerance. Determine if the campaign's budget is global or per-region, and how strict pacing must be.

2. Identify the Bottleneck

Explain why a single counter becomes a bottleneck: high contention, network latency, and single point of failure. Discuss the impact on the serving fleet, such as increased latency and reduced throughput.

3. Design a Distributed Pacing System

Propose sharding the counter across multiple nodes (e.g., by region or hash) and using a hierarchical aggregation (e.g., local counters synced to a global counter). Consider using a token bucket algorithm with distributed tokens.

4. Handle Hot Regions and Asynchrony

For hot regions, use local pacing with a share of the global budget, and asynchronously reconcile with the global counter. Allow slight overspend to avoid blocking, and use techniques like probabilistic early rejection.

5. Discuss Trade-offs and Failure Modes

Compare consistency vs. availability, and explain how to handle node failures, network partitions, and counter drift. Mention monitoring and adaptive adjustments to maintain pacing accuracy.

Key Points to Mention

  • Sharding the counter to distribute load and avoid single point of contention
  • Hierarchical aggregation with local and global counters for scalability
  • Token bucket or leaky bucket algorithms for rate limiting
  • Asynchronous synchronization and eventual consistency to reduce latency
  • Handling hot regions with local pacing and budget allocation
  • Trade-offs between accuracy, latency, and availability in distributed systems

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

Q7

How would you layer frequency capping (per-user impression limits) on top of the pacing system, and how do the two interact when making eligibility decisions?

System DesignTechnical Trade-offs
Author's notes

Last question and I was running low on energy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the goals and constraints of both pacing and frequency capping, then propose a layered architecture where frequency capping acts as a hard filter after pacing eligibility. Explain how they interact in the decision pipeline, including trade-offs around latency, consistency, and user experience.

Pro tip: Emphasize that frequency capping should be evaluated after pacing to avoid unnecessary cap checks, and discuss how to handle edge cases like clock skew and distributed counters without sacrificing performance.

1. Clarify requirements and constraints

Ask about the scale (e.g., millions of users), latency SLAs, and whether caps are global or per-campaign. Confirm if caps are hard limits or soft (e.g., with grace periods).

2. Design the layered eligibility pipeline

Propose a sequential evaluation: first check pacing eligibility (e.g., budget available, time-based throttling), then apply frequency capping. Explain why order matters for efficiency.

3. Detail frequency capping implementation

Describe a distributed counter store (e.g., Redis or Cassandra) with per-user impression counts, TTLs, and atomic increments. Discuss sharding and consistency trade-offs.

4. Explain interaction and failure modes

Cover how pacing and capping interact: pacing may reduce the need for cap checks, but capping can override pacing if a user is saturated. Address race conditions and fallback strategies.

5. Discuss trade-offs and optimizations

Highlight trade-offs: latency vs. accuracy, strict vs. eventual consistency, and cost of distributed counters. Suggest optimizations like local caching or probabilistic data structures.

Key Points to Mention

  • Order of evaluation: pacing first, then frequency capping to minimize expensive cap lookups.
  • Distributed counter design: sharding, replication, and consistency models (e.g., eventual vs. strong).
  • Latency and scalability: using in-memory stores (Redis) with TTLs and atomic operations.
  • Failure handling: graceful degradation if cap service is unavailable (e.g., fail-open or fail-closed based on business needs).
  • User experience: avoiding over-capping and ensuring fair distribution across campaigns.
  • Monitoring and feedback loops: tracking cap hit rates and adjusting pacing parameters dynamically.

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