This question evaluates competency in distributed systems architecture, real-time stateful services, high-cardinality time-series data modeling, API design for low-latency decision paths, and operational monitoring including consistency and latency trade-offs.
Design a real-time ad frequency capping system for an ads platform.
When the ad server is deciding whether to show an ad, it must enforce caps such as:
K
impressions in the last
T
hours (rolling window).
Requirements:
Explain data model, storage choices, write/read paths, deduplication, TTL/expiry, sharding strategy, and how you monitor/alert on correctness and system health.