PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Snapchat

Design real-time ad impression and spend tracking

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design and distributed systems skills, focusing on real-time event ingestion, accurate counter aggregation, low-latency read paths, scalability, and consistency in an ad impression and spend-tracking context, and it belongs to the System Design/backend domain.

  • nan
  • Snapchat
  • System Design
  • Software Engineer

Design real-time ad impression and spend tracking

Company: Snapchat

Role: Software Engineer

Category: System Design

Difficulty: nan

Interview Round: Onsite

## Scenario You are building a backend that helps an **ad server** decide whether a candidate ad can be delivered (e.g., not over budget / within pacing). The system must track: - **Impressions (ad view counts)** - **Spend** (money spent attributed to those impressions/clicks/etc.) ## Requirements 1. **Event collection**: For each ad view, the system should record an event (at least: `ad_id`, `campaign_id`, `user_id` optional, `timestamp`, and fields needed to compute spend). 2. **Near real-time decisioning**: When a user requests an ad, the ad server evaluates up to **10,000 candidate ads** and needs current counters (impressions/spend and remaining budget) to filter/score them. 3. **Latency**: The ad server request path should be low-latency (assume single-digit to tens of milliseconds for fetching counters). 4. **Scale**: High QPS for both event ingestion and read traffic from ad servers. 5. **Correctness**: Counters should be accurate enough for budget enforcement; clarify acceptable freshness (e.g., seconds) and consistency model. ## Deliverables Design the end-to-end system: - APIs (event ingestion + read APIs for ad server) - Data model - Storage/streaming components - How you serve counters for 10k ads per request efficiently - Handling duplicates, retries, and late events - Monitoring and failure recovery

Quick Answer: This question evaluates system design and distributed systems skills, focusing on real-time event ingestion, accurate counter aggregation, low-latency read paths, scalability, and consistency in an ad impression and spend-tracking context, and it belongs to the System Design/backend domain.

Related Interview Questions

  • Design a News Aggregator - Snapchat (hard)
  • Design a device owner lookup service - Snapchat (nan)
  • Design short URL service with click counting - Snapchat (hard)
  • Design a search-to-ads ranking pipeline - Snapchat (medium)
  • Design an Instagram Stories feature - Snapchat (medium)
Snapchat logo
Snapchat
Feb 12, 2026, 12:00 AM
Software Engineer
Onsite
System Design
4
0
Loading...

Scenario

You are building a backend that helps an ad server decide whether a candidate ad can be delivered (e.g., not over budget / within pacing). The system must track:

  • Impressions (ad view counts)
  • Spend (money spent attributed to those impressions/clicks/etc.)

Requirements

  1. Event collection : For each ad view, the system should record an event (at least: ad_id , campaign_id , user_id optional, timestamp , and fields needed to compute spend).
  2. Near real-time decisioning : When a user requests an ad, the ad server evaluates up to 10,000 candidate ads and needs current counters (impressions/spend and remaining budget) to filter/score them.
  3. Latency : The ad server request path should be low-latency (assume single-digit to tens of milliseconds for fetching counters).
  4. Scale : High QPS for both event ingestion and read traffic from ad servers.
  5. Correctness : Counters should be accurate enough for budget enforcement; clarify acceptable freshness (e.g., seconds) and consistency model.

Deliverables

Design the end-to-end system:

  • APIs (event ingestion + read APIs for ad server)
  • Data model
  • Storage/streaming components
  • How you serve counters for 10k ads per request efficiently
  • Handling duplicates, retries, and late events
  • Monitoring and failure recovery

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Snapchat•More Software Engineer•Snapchat Software Engineer•Snapchat System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.