[ OK ] 28 — full content available
[ INFO ] category: System Design difficulty: hard freq: high first seen: 2026-01-10
[HARD][SYSTEM DESIGN][HIGH]System DesignDistributed SystemsRedisKafkabackend
$ cat problem.md
Design a system to limit ad impressions per user per time window at Netflix scale.
Background:
Netflix runs promotional content that needs frequency capping - limiting how often a user sees the same ad or promotion.
Requirements:
- Cap impressions per user per ad per time window (e.g., max 3 times per day)
- Support real-time bidding decisions (< 100ms latency)
- Handle 300M+ users
- Track impressions across devices
Key Components:
- Read path (bidding): Check if user can see ad
- Write path (tracking): Record impression
- Redis for real-time cap storage
- Key design:
userId:adId:window vs userId:window
- Kafka for async impression tracking
- Per-ad vs per-campaign limits