← Snapchat Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Snapchat system design round for a software engineer role. The problem was building a Stories feature end to end, which sounds straightforward until you realize how many moving parts they actually want you to cover.

Questions Asked (5)

Q1

Design a Snapchat Stories system with 24-hour expiry, the ability to save or favorite stories for later re-watching, and offline support where local actions sync back when the user reconnects.

System DesignData ModelingTechnical Trade-offs
Author's notes

This was the whole interview, basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a high-level architecture that separates media storage, metadata, and delivery. Focus on the 24-hour expiry using TTL and lazy deletion, and design an offline-first client with a sync protocol that handles conflicts and idempotency.

Pro tip: Emphasize the trade-offs between eager vs. lazy deletion and how you'd handle clock skew and time zones for expiry. Also, discuss how you'd ensure sync reliability with retries and conflict resolution, showing you've thought about edge cases.

1. Clarify Requirements and Scale

Ask about user base, daily active users, story creation rate, and read patterns. Clarify what 'save' means (private vs. public) and offline capabilities (e.g., create stories offline, view cached stories).

2. High-Level Architecture

Outline components: mobile clients, API gateway, story service, media storage (e.g., S3), metadata store (e.g., Cassandra), CDN for delivery, and a sync service for offline actions.

3. Data Modeling and Expiry

Design schemas for stories, saved stories, and user feeds. Use TTL in the metadata store for automatic expiry, and consider lazy deletion for media. For saved stories, store references with no TTL.

4. Offline Support and Sync

Design client-side storage (e.g., SQLite) for offline actions. Implement a sync protocol with a queue of operations, idempotent APIs, and conflict resolution (e.g., last-write-wins or merge).

5. Trade-offs and Scalability

Discuss trade-offs: TTL vs. lazy deletion, consistency vs. availability, sync frequency vs. battery. Address scaling with sharding, caching, and CDN.

Key Points to Mention

  • TTL-based expiry in metadata store (e.g., Cassandra TTL) and lazy deletion for media to handle 24-hour expiry efficiently.
  • Separate storage for saved stories: copy media to a persistent bucket and store metadata without TTL.
  • Offline-first client design: local database, operation queue, and background sync with exponential backoff.
  • Idempotent APIs and conflict resolution strategies (e.g., vector clocks, last-write-wins) for sync.
  • CDN and caching for low-latency story delivery, with cache invalidation on expiry.
  • Handling clock skew and time zones: use server-side timestamps for expiry, not client clocks.

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 storage and CDN delivery for stories, including expiry and retention policies?

System DesignTechnical Trade-offs
Author's notes

Talked about blob storage with a TTL-based cleanup job and CDN edge caching with short cache lifetimes for active stories.

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 stories, media size, global user base) and then propose a high-level architecture that separates storage (object store) from delivery (CDN). Discuss how to handle expiry and retention policies through metadata-driven lifecycle management, and highlight trade-offs between cost, latency, and durability.

Pro tip: Emphasize that media expiry should be driven by metadata and asynchronous processes (e.g., TTL-based deletion) rather than hard-coded in the storage layer, to allow flexibility and avoid accidental data loss. Also, mention that CDN caching should respect expiry headers to avoid serving stale content.

1. Clarify Requirements and Scale

Ask about the expected number of stories, average media size, global distribution, and specific expiry/retention requirements (e.g., 24-hour stories, legal holds). This ensures the design meets actual needs.

2. Design Storage Architecture

Propose using an object storage system (e.g., S3, GCS) for durable, scalable storage of media. Discuss partitioning strategies (e.g., by user ID or time) and metadata storage (e.g., in a database) to track expiry and retention policies.

3. Implement CDN Delivery

Leverage a CDN to cache media at edge locations for low-latency global delivery. Explain how to set cache-control headers based on expiry (e.g., max-age) and how to invalidate or purge content when stories are deleted or expire.

4. Handle Expiry and Retention Policies

Describe a system where metadata includes TTL and retention rules. Use asynchronous workers or scheduled jobs to delete expired media from storage and purge CDN caches. For retention (e.g., legal holds), flag objects to prevent deletion.

5. Discuss Trade-offs and Optimizations

Address trade-offs: cost vs. performance (e.g., storage class selection, CDN pricing), consistency vs. availability (e.g., eventual consistency in deletion), and optimizations like tiered storage or lazy deletion.

Key Points to Mention

  • Object storage (e.g., S3) for scalability and durability, with metadata in a database for querying and policy enforcement.
  • CDN configuration: cache-control headers, TTL, and purge mechanisms to align with expiry policies.
  • Asynchronous deletion via TTL or scheduled jobs to avoid blocking user requests and ensure eventual consistency.
  • Retention policies: legal holds, compliance (e.g., GDPR), and how to flag objects to prevent automatic deletion.
  • Trade-offs: cost of storage vs. CDN, latency vs. consistency, and handling of hot vs. cold data.
  • Monitoring and auditing: tracking deletion success, CDN hit rates, and ensuring policies are enforced.

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

Q3

Walk through how you'd model the data for stories, views, and favorites.

Data ModelingSystem Design
Author's notes

Pretty comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core entities and their relationships: stories (ephemeral content), views (user interactions), and favorites (user preferences). Then propose a schema that balances read/write performance, scalability, and Snapchat's specific needs like ephemerality and high-volume writes.

Pro tip: Mention how you'd handle the ephemeral nature of stories (e.g., TTL indexes) and the high write volume of views (e.g., time-series or columnar storage) to show you understand Snapchat's unique challenges.

1. Clarify Requirements and Scale

Ask about expected read/write patterns, data volume, and latency requirements. For Snapchat, assume high write throughput for views and low-latency reads for stories.

2. Identify Core Entities and Relationships

Define entities: User, Story, View, Favorite. Determine relationships: a user creates many stories, a story has many views, a user can favorite many stories.

3. Design Schema for Each Entity

Propose tables/collections with fields and indexes. For stories, include TTL for ephemerality. For views, consider a time-series or wide-column store. For favorites, use a simple key-value or relational table.

4. Address Access Patterns and Queries

Explain how to efficiently fetch a user's stories, count views per story, and list a user's favorites. Discuss denormalization or caching for hot paths.

5. Discuss Trade-offs and Scalability

Compare SQL vs NoSQL choices, sharding strategies, and how to handle growth. Mention consistency vs availability trade-offs for views.

Key Points to Mention

  • Use of TTL indexes or scheduled deletion for ephemeral stories
  • High write volume for views: consider append-only logs or time-series databases
  • Denormalization for read-heavy operations like fetching a user's story feed
  • Sharding by user_id or story_id to distribute load
  • Caching frequently accessed data (e.g., story metadata, favorite lists)
  • Handling view counts with eventual consistency or approximate counters

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

Q4

How would you design the privacy and access control model for stories?

System DesignTechnical Trade-offs
Author's notes

Went with a visibility enum on the story: public, friends-only, custom list.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the types of stories (e.g., private, public, custom) and the access control requirements for each. Then propose a flexible model that combines role-based and attribute-based access control, and discuss trade-offs around performance, privacy, and user experience. Conclude with how you would handle edge cases like sharing, expiration, and revocation.

Pro tip: Emphasize the principle of least privilege and the need for auditability; mention that privacy is a product feature, not just a technical constraint, and that you'd design for user trust and transparency.

1. Clarify requirements and story types

Ask questions to understand the different story types (private, friends-only, public, custom) and the access rules for each. Identify who can view, contribute, and share.

2. Define access control model

Propose a hybrid model using RBAC for roles (owner, contributor, viewer) and ABAC for dynamic attributes (friendship, location, time). Explain how policies are evaluated.

3. Design enforcement and data flow

Describe how access checks are enforced at API and data layers, including caching for performance. Discuss how to handle sharing and revocation.

4. Address privacy and compliance

Incorporate privacy principles like data minimization, consent, and audit logging. Mention compliance with regulations (e.g., GDPR, CCPA).

5. Discuss trade-offs and scalability

Compare centralized vs. decentralized enforcement, latency vs. security, and how the model scales with millions of users. Suggest monitoring and iteration.

Key Points to Mention

  • Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC) hybrid
  • Principle of least privilege and default-deny
  • Audit logging and monitoring for access patterns
  • Performance considerations: caching, token-based auth, and eventual consistency
  • Privacy by design: data minimization, user consent, and transparency
  • Handling edge cases: story expiration, revocation, and sharing outside network

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

Q5

How do you handle scale for popular creators, specifically the fan-out problem when millions of users need to see a new story?

System DesignTechnical Trade-offs
Author's notes

This is where I felt most out of my depth.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale (e.g., millions of followers, read-heavy workload). Then discuss the fan-out problem, comparing push (write fan-out) vs pull (read fan-out) models, and propose a hybrid approach with optimizations like caching, precomputation, and asynchronous processing. Conclude by addressing trade-offs and potential bottlenecks.

Pro tip: Mention that for Snapchat, ephemeral content and real-time delivery are critical, so a push-based approach with edge caching and CDN integration is often preferred, but be ready to discuss how to handle celebrity accounts with millions of followers via a hybrid model.

1. Clarify requirements and scale

Ask about the number of followers, read/write ratio, latency requirements, and consistency needs to frame the problem.

2. Explain the fan-out problem

Define fan-out as the challenge of delivering a single story to millions of followers efficiently, and contrast push vs pull models.

3. Propose a hybrid approach

Suggest using push for normal users and pull for celebrities, or a combination, to balance write and read loads.

4. Discuss optimizations

Cover caching (e.g., Redis), CDNs, asynchronous queues, and precomputation to reduce latency and load.

5. Address trade-offs and bottlenecks

Analyze trade-offs like latency vs cost, and identify potential bottlenecks (e.g., hot partitions) and mitigation strategies.

Key Points to Mention

  • Push vs pull fan-out models and their trade-offs
  • Hybrid approach for celebrity accounts
  • Caching strategies (e.g., Redis, Memcached) and CDN usage
  • Asynchronous processing with message queues (e.g., Kafka)
  • Database sharding and partitioning to handle hot keys
  • Real-time delivery and ephemeral content considerations for Snapchat

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