← Netflix Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Netflix system design round, one big question that sprawled in every direction. The core prompt was about ad frequency capping but it kept branching into consistency models, failure modes, pipeline lag, the works. Came out unsure whether I'd gone deep enough on the right things.

Questions Asked (5)

Q1

Design a frequency capping system for an ad platform that limits how often a user sees a given ad or campaign within configurable time windows.

System DesignTechnical Trade-offsData Modeling
Author's notes

My instinct was to reach for Redis and call it a day, but the interviewer kept poking at the read vs write separation angle and I realized I'd conflated two pretty different workloads.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale, latency, consistency, and configurability. Then design a system that tracks user ad exposures and enforces caps using a fast, scalable data store, discussing trade-offs between accuracy and performance.

Pro tip: Emphasize the importance of low-latency reads for ad serving and consider using a combination of in-memory stores and eventual consistency to balance speed and accuracy. Also, discuss how to handle edge cases like clock skew and user privacy.

1. Clarify Requirements

Ask about scale (users, ads, QPS), latency requirements, consistency needs, and configurability (time windows, caps per ad/campaign).

2. High-Level Design

Outline components: a counter service to track exposures, a rules engine to evaluate caps, and a fast lookup store (e.g., Redis) for real-time decisions.

3. Data Modeling

Design keys (e.g., user_id:ad_id) and time-windowed counters (e.g., using sorted sets or sliding windows). Discuss TTL and aggregation strategies.

4. Scalability & Consistency

Address partitioning, replication, and trade-offs between strong and eventual consistency. Consider caching and pre-aggregation for performance.

5. Trade-offs & Edge Cases

Discuss handling of clock skew, user privacy, failure modes, and how to update caps dynamically without downtime.

Key Points to Mention

  • Use of Redis or similar in-memory store for low-latency counter updates and reads.
  • Time-windowed counters using sliding windows or fixed buckets with TTL.
  • Partitioning strategy (e.g., by user_id) to scale horizontally.
  • Trade-off between strong consistency (accurate caps) and eventual consistency (higher availability/performance).
  • Configurability: dynamic rule updates via a config service or database.
  • Privacy considerations: anonymizing user IDs and complying with regulations.

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

Q2

How would your design change at 100x the current scale, especially if a single campaign or user becomes a hot key on one counter shard?

System DesignTechnical Trade-offs
Author's notes

Talked about sharding the counter key by adding a suffix and then aggregating reads, which is the obvious move.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current architecture and assumptions, then systematically address scaling bottlenecks, focusing on the hot key problem. Propose a multi-layered solution combining sharding, caching, and asynchronous processing, and discuss trade-offs between consistency, latency, and cost.

Pro tip: Emphasize that hot keys are inevitable at scale, so design for graceful degradation and automatic mitigation rather than trying to prevent them entirely. Mention Netflix's own tools like EVCache and Hystrix to show familiarity with their stack.

1. Clarify Current Design and Assumptions

Ask questions to understand the existing system: data model, sharding strategy, read/write patterns, and SLAs. State assumptions about scale (e.g., QPS, data volume) to ground your answer.

2. Identify Bottlenecks at 100x Scale

Analyze how each component (database, cache, network, application) would fail under 100x load. Highlight that a single hot key can overload a shard, causing latency spikes and cascading failures.

3. Propose Mitigation Strategies for Hot Keys

Suggest techniques like key splitting (adding a random suffix), local caching, request coalescing, and moving hot keys to dedicated shards. Discuss trade-offs of each approach.

4. Redesign for Scalability and Resilience

Outline a revised architecture: multi-level caching, asynchronous writes, dynamic sharding, and auto-scaling. Include monitoring and alerting for hot keys and automatic mitigation triggers.

5. Discuss Trade-offs and Validation

Summarize trade-offs between consistency, availability, latency, and cost. Explain how you would test the design (load testing, chaos engineering) and iterate.

Key Points to Mention

  • Sharding strategies (hash-based, range-based) and their limitations with hot keys
  • Caching layers (client-side, CDN, distributed cache like EVCache) and cache invalidation
  • Asynchronous processing and queueing to decouple writes and absorb spikes
  • Rate limiting and backpressure to protect the system from overload
  • Monitoring and observability to detect hot keys and trigger auto-scaling
  • Trade-offs: consistency vs. availability, latency vs. cost, complexity vs. maintainability

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

Q3

A campaign requires exact enforcement with zero overshoot allowed. What changes in your design, and what does that cost?

System DesignTechnical Trade-offs
Author's notes

This is where I got a bit stuck.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify what 'exact enforcement with zero overshoot' means in the context of the campaign (e.g., ad delivery, resource allocation, rate limiting) and identify the current design's sources of overshoot. Then propose design changes such as adding a strict admission control, using a token bucket with precise refill, or implementing a feedback loop with real-time monitoring, and analyze the trade-offs in terms of latency, throughput, cost, and complexity.

Pro tip: Quantify the cost: e.g., 'This change would increase latency by X ms and require Y additional servers, but ensures zero overshoot.' Also, mention that you would validate with load testing and canary deployments to ensure the strict enforcement holds under peak conditions.

1. Clarify requirements and context

Ask questions to understand what 'exact enforcement' means: is it about ad impressions, budget spend, API rate limits, or something else? What is the current system and where does overshoot occur?

2. Identify sources of overshoot

Analyze the existing design to pinpoint why overshoot happens: e.g., distributed counters with eventual consistency, batching, asynchronous processing, or lack of real-time coordination.

3. Propose design changes

Suggest specific modifications: e.g., centralized enforcement point, synchronous checks, token bucket with precise refill, or a two-phase commit protocol. Explain how each ensures zero overshoot.

4. Analyze trade-offs and costs

Discuss the impact on latency, throughput, scalability, availability, and operational complexity. Quantify where possible (e.g., increased latency, need for more resources).

5. Validate and monitor

Describe how you would test the new design (load testing, chaos engineering) and monitor it in production to ensure zero overshoot is maintained.

Key Points to Mention

  • Distributed systems challenges: CAP theorem, consistency vs. availability, and the need for coordination.
  • Specific mechanisms: token bucket, leaky bucket, rate limiting, admission control, two-phase commit, or consensus algorithms like Raft/Paxos.
  • Trade-offs: increased latency, reduced throughput, higher infrastructure cost, and potential single point of failure.
  • Netflix context: microservices, high availability, and the need to balance strict enforcement with user experience.
  • Monitoring and alerting: real-time metrics, anomaly detection, and automated rollback.
  • Alternative approaches: if zero overshoot is impossible, suggest compensating actions or business-level adjustments.

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

Q4

Your aggregation pipeline falls several hours behind. How do you detect that, how does serving degrade gracefully, and how do you recover accurate counts afterward?

System DesignRoot Cause Analysis
Author's notes

Genuinely the question I felt worst about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around three phases: detection, graceful degradation, and recovery. For detection, describe monitoring lag metrics and alerting; for degradation, explain fallback strategies like serving approximate counts with clear labeling; for recovery, outline a process to recompute accurate counts and backfill data. Emphasize trade-offs and Netflix-scale considerations.

Pro tip: Show maturity by discussing how you'd communicate the issue to stakeholders and prioritize user experience over perfect accuracy during degradation. Mention that you'd add guardrails to prevent recurrence, such as automated lag alerts and circuit breakers.

1. Detection

Monitor pipeline lag using metrics like event-time vs processing-time, watermark delays, and consumer offsets. Set up alerts when lag exceeds thresholds (e.g., >1 hour) and track data freshness SLAs.

2. Graceful Degradation

Serve approximate or stale counts with clear labeling (e.g., 'updated 2 hours ago'). Implement fallback to last known good state or use a separate low-latency approximate counting system (e.g., HyperLogLog) to maintain availability.

3. Recovery and Backfill

Once the pipeline is restored, reprocess the backlog using idempotent writes and checkpointing. Recompute accurate counts by replaying events from a durable log (e.g., Kafka) and merging with existing state.

4. Validation and Reconciliation

Compare recomputed counts against approximate counts and investigate discrepancies. Use checksums or sampling to verify data integrity, and update serving layer atomically to avoid inconsistencies.

5. Prevention and Post-Mortem

Conduct a root cause analysis, add automated scaling, improve monitoring, and implement circuit breakers. Document lessons learned and adjust SLAs to balance accuracy and availability.

Key Points to Mention

  • Monitoring lag with metrics like watermark delay and consumer offset, and setting up alerts.
  • Serving approximate counts with clear freshness indicators to maintain user trust.
  • Using idempotent writes and checkpointing for safe reprocessing.
  • Leveraging a durable event log (e.g., Kafka) for replay and backfill.
  • Reconciliation between approximate and accurate counts to ensure correctness.
  • Post-incident prevention: auto-scaling, circuit breakers, and improved observability.

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

Q5

An ad is selected and a slot is reserved, but the ad never actually renders because the user scrolls away or the page is abandoned. How do you prevent over-counting those impressions?

System DesignTechnical Trade-offs
Author's notes

Liked this one actually.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the difference between an ad being 'selected/reserved' and an 'impression' as defined by IAB/MRC standards (i.e., ad must be rendered and at least 50% visible for 1 second). Then propose a client-side rendering confirmation mechanism that only fires an impression event when the ad is actually displayed, with server-side deduplication and reconciliation to handle edge cases.

Pro tip: Emphasize that over-counting is not just a technical bug but a business risk—it inflates metrics, wastes advertiser budget, and can lead to financial penalties. Show you understand the trade-off between accuracy and latency by suggesting a two-phase commit: reserve on server, confirm on client, and reconcile asynchronously.

1. Define impression criteria

Clarify what constitutes a valid impression according to industry standards (e.g., IAB/MRC: ad must be rendered and at least 50% visible for 1 second). This sets the ground truth for counting.

2. Implement client-side rendering confirmation

Use browser APIs like IntersectionObserver or visibilitychange to detect when the ad is actually in the viewport and rendered. Only then send an impression event to the server.

3. Add server-side deduplication and reconciliation

On the server, track ad reservations and only count impressions that are confirmed by the client. Use a unique impression ID to deduplicate and reconcile late or missing confirmations.

4. Handle edge cases and failures

Account for ad blockers, network failures, and page unloads. Use beacon API or sendBeacon for reliable delivery, and implement timeouts to expire unconfirmed reservations.

5. Monitor and iterate

Set up metrics to compare reserved vs. confirmed impressions, detect anomalies, and continuously refine the logic based on real-world data.

Key Points to Mention

  • IAB/MRC impression definition: rendered and 50% visible for 1 second
  • Client-side visibility detection using IntersectionObserver or Page Visibility API
  • Server-side reservation and confirmation with unique IDs for deduplication
  • Use of navigator.sendBeacon for reliable event delivery on page unload
  • Trade-offs between accuracy, latency, and system complexity
  • Reconciliation and monitoring to handle discrepancies and edge cases

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