← Netflix Interview Insights

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

SeniorPrefer not to say
Jul 2026

Summary

Netflix system design round, one big question about ads frequency capping. Spent the whole session on it and it went pretty deep into territory I wasn't fully prepared for.

Questions Asked (1)

Q1

Design a frequency-cap system for ads: at the time an ad is served, determine whether a user has already seen a specific ad, campaign, or advertiser more than a configured limit within a given time window. Address the data model, how you'd store and update counters, keeping reads under 10ms, handling high write throughput, eventual consistency, multi-region replication, and what happens when the cap store goes down.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one sprawled in ways I didn't anticipate.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a low-latency, eventually consistent counter store using a time-bucketed data model. Discuss trade-offs between consistency, availability, and latency, and outline fallback strategies for store failures.

Pro tip: Emphasize that ad frequency capping is a business decision: sometimes serving an ad slightly over the cap is acceptable to avoid under-delivery, so design for graceful degradation rather than strict consistency.

1. Clarify Requirements and Scale

Ask about expected QPS, latency SLA, consistency needs, and failure tolerance. Confirm the granularity (ad, campaign, advertiser) and time windows (e.g., hourly, daily).

2. Design Data Model and Storage

Propose a key-value store with composite keys (e.g., user_id:entity_type:entity_id:time_bucket) and counters. Use time-bucketed counters to enable efficient windowed queries and TTL-based cleanup.

3. Ensure Low-Latency Reads and High Write Throughput

Use an in-memory store (e.g., Redis) with pipelining and sharding to handle high write throughput. For reads under 10ms, keep counters in memory and use local caching with short TTLs.

4. Address Consistency and Multi-Region Replication

Choose eventual consistency with asynchronous replication across regions. Discuss conflict resolution (e.g., last-write-wins or CRDTs) and how to handle regional failover.

5. Plan for Failure and Degradation

If the cap store is down, fall back to serving ads without caps (or with a local cache) to avoid revenue loss. Implement circuit breakers and monitoring to detect failures quickly.

Key Points to Mention

  • Time-bucketed counters with TTL for efficient windowed queries and automatic cleanup.
  • Use of in-memory data stores (e.g., Redis) with sharding and replication for low latency and high throughput.
  • Eventual consistency model with asynchronous cross-region replication and conflict resolution strategies.
  • Fallback mechanisms: serve ads without caps or use local cache when the cap store is unavailable.
  • Monitoring and alerting for cap store health, and circuit breakers to prevent cascading failures.
  • Trade-offs between strict consistency and availability, and how business requirements influence the design.

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