Design an ad frequency capping service
Design the service that decides, at ad-serving time, whether a user may see another ad from a campaign, so that caps like "at most 3 per user per day" or "exactly once" hold. Cover the low-latency read path, atomic counter updates, how events are keyed and replayed, and offline aggregation for reporting and budget pacing.
No answer yet. Write the first one; the best answer gets endorsed.
