PracHub
QuestionsPremiumLearningGuidesInterview PrepCoaches
|Home/System Design/Snapchat

Design product co-occurrence analytics API

Last updated: Mar 29, 2026

Quick Overview

This question evaluates design skills for RESTful APIs and backend systems, covering API schema and versioning, authentication and rate limiting, caching and cache invalidation, storage models, precomputation pipelines, consistency and staleness bounds, monitoring, and operational concerns.

  • hard
  • Snapchat
  • System Design
  • Software Engineer

Design product co-occurrence analytics API

Company: Snapchat

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design RESTful APIs to serve co-purchase analytics. Define endpoints to: (a) fetch the top related products for a given product_id, (b) filter by time window, region, or channel, and (c) paginate results. Specify request/response schemas, authentication and authorization, rate limiting, caching and cache invalidation, SLA and timeouts, idempotency, and versioning. Describe the storage model and precomputation pipeline (e.g., batch aggregation or streaming), consistency expectations, and monitoring/alerting. Discuss how you would test the API and roll out changes safely.

Quick Answer: This question evaluates design skills for RESTful APIs and backend systems, covering API schema and versioning, authentication and rate limiting, caching and cache invalidation, storage models, precomputation pipelines, consistency and staleness bounds, monitoring, and operational concerns.

Related Interview Questions

  • Design a News Aggregator - Snapchat (hard)
  • Design a device owner lookup service - Snapchat (nan)
  • Design real-time ad impression and spend tracking - Snapchat (nan)
  • Design short URL service with click counting - Snapchat (hard)
  • Design a search-to-ads ranking pipeline - Snapchat (medium)
Snapchat logo
Snapchat
Sep 6, 2025, 12:00 AM
Software Engineer
Onsite
System Design
3
0

Design RESTful APIs for Co‑Purchase Analytics

Context

You are designing backend APIs to power a "related products" module based on co‑purchase behavior (market-basket analytics). The service must support high read throughput, filtering (time, region, channel), and predictable latency. It will be consumed by internal services and client applications.

Requirements

Design RESTful APIs and the surrounding system to:

  1. Endpoints
    • (a) Fetch top related products for a given product_id.
    • (b) Filter by time window, region, or channel.
    • (c) Paginate results.
  2. Interface Details
    • Specify request/response schemas (including error format).
    • Define authentication and authorization.
    • Define rate limiting.
    • Define caching strategy and cache invalidation.
    • Define SLA targets and timeouts.
    • Describe idempotency behavior.
    • Define versioning strategy.
  3. Data & Systems
    • Describe the storage model for serving co‑purchase results.
    • Describe the precomputation pipeline (batch and/or streaming).
    • State consistency expectations and staleness bounds.
    • Describe monitoring and alerting.
  4. Operations
    • Explain how to test the API (functional, performance, data quality).
    • Explain how to roll out changes safely (backward compatibility, canary, versioning).

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.