← Snapchat Interview Insights

Snapchat·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Apr 2026

Summary

System design round at Snapchat for a software engineer role, centered entirely on designing something like Instagram Stories. Lots of ground to cover and the breadth of it caught me off guard a bit.

Questions Asked (4)

Q1

Design a Stories feature where users can post short photo or video content that disappears after 24 hours, and followers can see a feed of unread stories per user.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is a big one and I underestimated the scope early on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then design the high-level architecture covering storage, feed generation, and expiration. Dive into data modeling for stories and the unread feed, and discuss trade-offs like push vs. pull for feed updates and storage strategies for media.

Pro tip: Emphasize the importance of efficient unread story tracking and expiration, as these are core to Snapchat's ephemeral nature. Mention using a time-series or TTL-based store for stories and a separate store for unread counts to ensure scalability.

1. Clarify Requirements

Ask about scale (DAU, stories per user), latency requirements, and whether stories are public or only for followers. Confirm that stories expire after 24 hours and that the feed shows unread stories per user.

2. High-Level Design

Outline components: API gateway, story service, media storage (e.g., S3), metadata store (e.g., Cassandra), feed service, and notification service. Discuss how followers retrieve stories.

3. Data Modeling

Design schemas for stories (story_id, user_id, media_url, timestamp, expiration) and unread tracking (user_id, follower_id, last_seen_story_id). Consider using Redis for unread counts and TTL for expiration.

4. Feed Generation

Decide between push (fan-out on write) and pull (fan-out on read) models. For Snapchat, a hybrid approach may work: push story metadata to followers' feeds, but fetch media on demand.

5. Trade-offs and Scalability

Discuss trade-offs: push vs. pull, SQL vs. NoSQL, consistency vs. availability. Address scaling with sharding, caching, and CDN for media.

Key Points to Mention

  • Use of TTL in databases (e.g., Redis, Cassandra) to automatically expire stories after 24 hours.
  • Efficient unread story tracking: maintain a per-follower list of unread story IDs or a last-seen timestamp per friend.
  • Media storage: store photos/videos in object storage (S3) with CDN for fast delivery, and metadata in a scalable NoSQL store.
  • Feed generation strategy: push vs. pull, and how to handle users with many followers (celebrities).
  • Handling read receipts: updating unread status when a follower views a story.
  • Scalability considerations: sharding by user_id, caching hot stories, and using a message queue for asynchronous processing.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle media upload and delivery at scale, including the CDN strategy?

System DesignTechnical Trade-offs
Author's notes

Pretty standard territory if you've done any media system design before.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale (e.g., daily uploads, concurrent users), media types (images, videos), and latency/availability goals. Then walk through the end-to-end flow: client upload, storage, processing, and CDN delivery, highlighting trade-offs and Snapchat-specific constraints like ephemeral content and mobile-first users.

Pro tip: Emphasize cost and performance trade-offs, and mention how you'd measure success (e.g., upload success rate, p95 latency, CDN hit ratio). Show awareness that Snapchat's media is often ephemeral, so caching and storage strategies must align with TTL and privacy requirements.

1. Clarify Requirements and Constraints

Ask about scale (e.g., millions of daily uploads), media types (images, short videos), and non-functional requirements like latency, durability, and cost. Consider Snapchat's mobile-first, global user base and ephemeral content model.

2. Design Upload Path

Propose a scalable upload service: use pre-signed URLs for direct-to-storage uploads (e.g., S3), handle resumable uploads for large files, and validate/transcode media asynchronously via a queue. Discuss trade-offs between client-side vs server-side processing.

3. Design Storage and Processing

Choose object storage for raw media, with metadata in a database. For processing (e.g., transcoding, thumbnails), use a distributed queue and worker pool. Consider tiered storage (hot vs cold) and lifecycle policies for ephemeral content.

4. Design CDN Strategy

Use a multi-CDN or major CDN (e.g., CloudFront, Akamai) with edge caching. Set appropriate cache-control headers (e.g., long TTL for immutable media, short TTL for ephemeral). Implement signed URLs for access control and consider geo-distribution for low latency.

5. Address Trade-offs and Monitoring

Discuss trade-offs: cost vs performance, consistency vs availability, and complexity of multi-CDN. Outline monitoring: upload success rate, CDN hit ratio, latency percentiles, and error rates. Mention failure handling and retries.

Key Points to Mention

  • Pre-signed URLs for direct client-to-storage uploads to reduce server load
  • Asynchronous processing pipeline with queues for transcoding and thumbnails
  • CDN caching strategies: cache-control headers, TTL based on content ephemerality
  • Signed URLs or tokens for secure media access, especially for private/ephemeral content
  • Multi-CDN or edge computing for global low-latency delivery
  • Monitoring and metrics: upload success rate, CDN hit ratio, p95 latency, cost per GB

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you track which stories a user has already viewed, and what storage approach would you use?

System DesignData Modeling
Author's notes

I went with a Redis bitmap keyed by user ID, with one bit per story.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements (e.g., number of users, stories, read latency, consistency needs). Then propose a data model that tracks viewed stories per user, and discuss storage options like a distributed key-value store (e.g., Redis, Cassandra) for fast writes and reads, with possible caching and TTL for ephemeral stories. Finally, address trade-offs between consistency, latency, and cost.

Pro tip: Mention that Snapchat stories are ephemeral and often viewed once, so you can optimize for write-heavy workloads and use TTL to automatically expire viewed markers, reducing storage costs. Also, consider using a Bloom filter or probabilistic data structure to reduce memory footprint if exact tracking isn't required.

1. Clarify Requirements

Ask about scale (DAU, stories per user), read/write patterns, latency requirements, and consistency needs. Determine if tracking must be exact or approximate, and if viewed status should persist after story expiration.

2. Design Data Model

Propose a schema: e.g., a key-value store with key = user_id + story_id, value = timestamp or boolean. Alternatively, use a wide-column store with user_id as partition key and story_id as clustering column for efficient range queries.

3. Choose Storage Technology

Select a storage solution based on requirements: Redis for low-latency in-memory storage with TTL, Cassandra for scalable write-heavy workloads, or a combination (Redis as cache, Cassandra as persistent store). Discuss sharding and replication.

4. Address Scalability and Performance

Explain how to handle high write throughput (e.g., write-ahead log, eventual consistency) and fast reads (e.g., caching, denormalization). Consider partitioning by user_id to distribute load.

5. Discuss Trade-offs and Optimizations

Compare exact vs. approximate tracking (e.g., Bloom filters), TTL for ephemeral data, and cost implications. Mention monitoring and metrics to ensure system health.

Key Points to Mention

  • Use of key-value stores like Redis or Cassandra for fast writes and reads.
  • Data model: composite key (user_id, story_id) with timestamp or boolean value.
  • TTL (time-to-live) to automatically expire viewed markers for ephemeral stories.
  • Sharding/partitioning by user_id to scale horizontally.
  • Caching layer to reduce latency for frequently accessed data.
  • Trade-offs: consistency vs. availability, exact vs. approximate tracking (e.g., Bloom filters).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you rank or order stories in a follower's feed?

Product Sense & IdeationSystem DesignProduct Analytics & Metrics
Author's notes

Wasn't expecting this to come up but it did.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the goal of the feed (e.g., maximize engagement, retention, or time spent) and the types of stories (friends, publishers, ads). Then propose a ranking framework that combines candidate generation, feature engineering, and a machine learning model to predict relevance, while balancing multiple objectives like freshness, diversity, and user experience.

Pro tip: Emphasize that ranking is not just about engagement metrics; it's crucial to consider long-term user satisfaction and avoid clickbait or low-quality content that could harm retention. Also, mention the importance of real-time signals and experimentation (A/B testing) to validate the ranking algorithm.

1. Clarify Objectives and Constraints

Ask clarifying questions to understand the primary goal (e.g., engagement, retention, revenue) and constraints (e.g., latency, privacy, content policies). This ensures the ranking aligns with business and user needs.

2. Define Candidate Generation

Explain how to select a set of stories to rank from the potentially large pool (e.g., all friends' stories, followed publishers). This could involve filtering by recency, relevance, or using a lightweight model to reduce the set.

3. Identify Ranking Signals and Features

List key features that influence ranking, such as user-story affinity (past interactions), story freshness, content type, creator relationship, and contextual factors (time of day, device).

4. Design the Ranking Model and Objectives

Propose a machine learning model (e.g., gradient boosted trees, neural network) to predict a relevance score. Define the objective function (e.g., weighted sum of predicted engagement probabilities) and how to combine multiple objectives (e.g., diversity, freshness).

5. Evaluate and Iterate

Describe offline evaluation metrics (e.g., AUC, NDCG) and online A/B testing to measure impact on key metrics. Discuss how to monitor for biases and adjust the model over time.

Key Points to Mention

  • Multi-objective optimization: balancing engagement (clicks, replies) with long-term satisfaction and diversity.
  • Feature engineering: user-creator affinity, story recency, content type, and contextual signals.
  • Machine learning model choice: e.g., logistic regression for interpretability or deep learning for complex patterns.
  • Real-time personalization: using streaming data to update rankings quickly.
  • Cold start problem: handling new users or new stories with limited interaction data.
  • A/B testing and metrics: defining success metrics (e.g., DAU, time spent) and running experiments to validate changes.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.