Real-time Ad Frequency Capping System
Design a high-scale system to enforce frequency caps for digital advertisements. A frequency cap limits the number of times a specific user sees a specific ad or campaign within a set time window (e.g., no more than 3 views per 24 hours). The system must handle 500,000+ QPS with sub-10ms latency for the capping check during the ad selection process. Consider how to handle sliding windows, data storage for billions of counters, and the trade-offs between strict consistency and system availability.
RedisKafkagRPCPostgreSQLLua ScriptingSorted SetsLoad Balancer
01