Katkat

Design a real-time ad impression aggregator

MetaSoftware Engineer · Technical Screen

Last updated

This question evaluates a candidate's ability in scalable real-time system design, covering competencies such as stream processing, event aggregation, time-windowed metrics, handling late and out-of-order events, and designing for very high write throughput.

Design an ads impression aggregator service with the following requirements:

  • The system ingests a high-volume stream of impression events (each event at least contains ad_id and event timestamp; you may add fields like request_id/device_id for dedup).
  • The system must provide near real-time updates within 30 seconds.
  • It must expose per-ad impression counts aggregated by hour (e.g., counts for ad_id=123 for 2026-02-23 10:00-10:59).
  • Discuss how you would store/serve these aggregates and handle late/out-of-order events.

Follow-up: How do you handle very high write throughput to the database/storage layer?