← Snapchat Interview Insights

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

Senior
May 2026

Summary

System design round at Snapchat for a software engineering role. The whole thing was a deep crawling and catalog infrastructure problem, way more involved than I expected for a single session.

Questions Asked (6)

Q1

Design a product catalog system for an ad company that crawls third-party e-commerce sites to build its own structured catalog, without any data feeds from the merchants.

System DesignTechnical Trade-offs
Author's notes

This is a beast of a question.

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 covering crawling, extraction, normalization, and storage. Dive into key components like deduplication, data quality, and scalability, discussing trade-offs at each step.

Pro tip: Emphasize the importance of data freshness and accuracy, and propose a feedback loop to continuously improve extraction quality. Also, consider legal and ethical aspects of crawling, showing maturity.

1. Clarify Requirements and Scale

Ask questions to understand the scope: number of sites, update frequency, data volume, and required data fields. This ensures the design meets actual needs.

2. High-Level Architecture

Outline the main components: crawler, parser/extractor, normalizer, deduplicator, storage, and serving layer. Explain how data flows through the system.

3. Deep Dive into Key Components

Discuss crawling strategy (scheduling, politeness, scalability), extraction techniques (ML-based, rule-based), and data normalization (mapping to a standard schema).

4. Address Data Quality and Deduplication

Explain how to handle duplicates, conflicting information, and stale data. Propose validation and quality scoring mechanisms.

5. Scalability and Trade-offs

Discuss scaling the system (distributed crawling, storage choices) and trade-offs between consistency, latency, and cost.

Key Points to Mention

  • Crawling at scale: distributed crawlers, rate limiting, and politeness policies
  • Data extraction: using machine learning (e.g., DOM parsing, computer vision) to handle diverse site structures
  • Normalization: mapping heterogeneous product data to a unified schema
  • Deduplication: identifying same products across sites using fuzzy matching or product identifiers
  • Data freshness: incremental crawling and update strategies
  • Legal/ethical considerations: respecting robots.txt, terms of service, and copyright

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

Q2

How would you handle crawler politeness, specifically robots.txt compliance and rate limiting across many partner sites?

System DesignAPI & Integrations
Author's notes

I knew this area reasonably well.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the importance of ethical crawling and legal compliance, then outline a system that dynamically fetches and respects robots.txt for each partner site, and finally describe a rate-limiting strategy that adapts per site based on their tolerance and your crawling needs. Emphasize scalability, fault tolerance, and monitoring to ensure politeness across many sites.

Pro tip: Mention that you would cache robots.txt with appropriate TTL and handle changes gracefully, and that you'd implement exponential backoff with jitter on 429/503 responses to avoid hammering sites during issues.

1. Understand requirements and constraints

Clarify the scale (number of partner sites, crawl frequency), legal/ethical considerations, and any existing agreements with partners. Identify if there are different politeness policies per partner.

2. Design robots.txt compliance

Implement a robots.txt parser and cache with per-site TTL. Before crawling any URL, check the cached rules; if expired, re-fetch. Respect disallow rules, crawl-delay, and sitemaps. Handle fetch failures gracefully (e.g., default to disallow or conservative crawl).

3. Implement adaptive rate limiting

Use a per-site rate limiter (e.g., token bucket) with configurable rates. Start conservative, then adjust based on response headers (Retry-After), error rates, and partner feedback. Apply exponential backoff with jitter on 429/503 errors.

4. Ensure scalability and monitoring

Distribute crawling across workers with a centralized coordination service (e.g., Redis) for rate limits and robots.txt cache. Monitor compliance, error rates, and latency; alert on violations or anomalies.

5. Handle edge cases and failures

Address scenarios like robots.txt changes, site downtime, and rate limit overrides. Implement circuit breakers to pause crawling a site if it becomes unresponsive or returns repeated errors.

Key Points to Mention

  • robots.txt caching with TTL and re-fetching to respect updates
  • Per-site rate limiting using token bucket or leaky bucket algorithms
  • Exponential backoff with jitter for retries on 429/503
  • Centralized coordination for distributed crawlers (e.g., Redis for rate limits)
  • Monitoring and alerting for compliance and performance
  • Handling crawl-delay directive and sitemaps from robots.txt

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

Q3

Per-site HTML parsing templates versus ML-based extraction: what are the trade-offs and when would you use each?

Technical Trade-offsSystem Design
Author's notes

My instinct was to go ML-first because it scales better across new sites.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the core trade-off between precision/control and scalability/generalization. Then walk through dimensions like maintenance, accuracy, cost, and adaptability, and conclude with a decision framework based on scale, volatility, and data availability.

Pro tip: Emphasize that the best solution is often a hybrid: use ML for broad coverage and fall back to templates for high-value sites, and mention that you'd measure ROI by tracking extraction accuracy and engineering hours saved.

1. Define the approaches

Briefly explain what per-site HTML parsing templates are (hand-crafted rules for specific sites) and what ML-based extraction entails (models trained to generalize across sites).

2. Compare trade-offs

Discuss dimensions such as accuracy, development speed, maintenance overhead, scalability, cost, and robustness to site changes.

3. Consider context factors

Identify factors that influence the choice: number of sites, frequency of layout changes, availability of labeled data, and required precision.

4. Propose a decision framework

Outline when to use each: templates for few, stable, high-value sites; ML for many, dynamic sites or when generalization is key.

5. Discuss hybrid and evolution

Mention that a hybrid approach (ML with template fallback) or starting with templates and transitioning to ML as scale grows can be effective.

Key Points to Mention

  • Precision vs. recall: templates can achieve near-perfect precision on known sites, while ML may have lower precision but higher recall across diverse sites.
  • Maintenance cost: templates require manual updates when sites change, whereas ML models can be retrained but need ongoing data and infrastructure.
  • Scalability: ML scales better to thousands of sites, but templates are simpler for a small number of high-value targets.
  • Data requirements: ML needs labeled training data, which can be expensive to obtain; templates require domain expertise but no training data.
  • Latency and cost: templates are typically faster and cheaper at inference; ML models may require significant compute resources.
  • Hybrid approaches: combining both can leverage strengths and mitigate weaknesses, e.g., using ML to bootstrap templates or templates to correct ML errors.

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

Q4

How would you deduplicate products that appear on multiple partner sites, given no shared SKU standard?

Data ModelingAlgorithms & Data Structures
Author's notes

Blanked for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business goal and constraints (e.g., scale, latency, accuracy). Then propose a multi-stage deduplication pipeline: first normalize and enrich product data, then generate candidate pairs using blocking or hashing, and finally apply similarity scoring and clustering to identify duplicates. Emphasize trade-offs between precision and recall, and suggest a feedback loop for continuous improvement.

Pro tip: Mention that you would start with a rule-based approach for quick wins and high precision, then layer in machine learning for fuzzy matching to improve recall. Also highlight the importance of measuring business impact (e.g., reduced duplicate listings) to prioritize efforts.

1. Clarify Requirements and Constraints

Ask about scale (number of products, partners), latency requirements, acceptable error rates, and available data (e.g., titles, descriptions, images). This ensures the solution aligns with business needs.

2. Data Normalization and Enrichment

Standardize text (lowercase, remove punctuation), extract attributes (brand, model, color), and enrich with external data (e.g., GTIN, UPC) where possible. This reduces noise and improves matching accuracy.

3. Candidate Generation

Use blocking techniques (e.g., MinHash LSH, phonetic algorithms) to group similar products into candidate pairs, reducing the comparison space from O(n^2) to manageable sizes.

4. Similarity Scoring and Clustering

Compute similarity scores using string metrics (Jaccard, cosine) and/or ML models (e.g., Siamese networks). Then cluster products into duplicate groups using threshold-based or graph-based methods.

5. Evaluation and Iteration

Measure precision/recall on a labeled dataset, monitor performance in production, and incorporate user feedback to refine rules and models. Consider active learning for ambiguous cases.

Key Points to Mention

  • Blocking techniques to reduce computational complexity
  • Use of external identifiers (GTIN, UPC) for exact matching when available
  • Fuzzy matching algorithms (Levenshtein, Jaro-Winkler) and ML models for similarity
  • Clustering methods (connected components, hierarchical clustering) to group duplicates
  • Trade-offs between precision and recall, and how to tune thresholds
  • Scalability considerations (distributed computing, incremental updates)

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

Q5

How would you optimize storage costs for the media assets (images and videos) you're pulling from partner sites?

System DesignTechnical Trade-offs
Author's notes

Talked about perceptual hashing to avoid storing duplicate images, tiered storage for less-accessed media, and lazy transcoding for video.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and access patterns of the media assets, then propose a multi-layered optimization strategy covering storage tiers, compression, deduplication, and lifecycle policies. Emphasize trade-offs between cost, latency, and quality, and how you would measure and iterate on the solution.

Pro tip: Quantify the impact: estimate potential savings (e.g., 'moving infrequently accessed media to cold storage could cut costs by 60%') and mention monitoring tools to track cost per GB and access patterns. This shows business acumen and a data-driven approach.

1. Clarify requirements and constraints

Ask about the volume of media, access frequency, latency requirements, and budget constraints to tailor your optimization strategy.

2. Analyze current storage and access patterns

Discuss how you would instrument the system to understand data access patterns, hot vs. cold data, and current cost breakdown.

3. Propose storage optimizations

Suggest techniques like compression, transcoding to efficient formats, deduplication, and using tiered storage (hot, warm, cold) based on access patterns.

4. Implement lifecycle policies and automation

Describe how to automate data movement between tiers, set expiration policies, and leverage CDNs to reduce origin storage and egress costs.

5. Monitor, measure, and iterate

Explain how you would track cost savings, performance impact, and adjust strategies based on metrics and feedback.

Key Points to Mention

  • Storage tiering (hot/warm/cold) based on access frequency
  • Compression and transcoding (e.g., WebP, AV1) to reduce file sizes
  • Deduplication and content-addressed storage to avoid storing duplicates
  • Lifecycle policies for automatic deletion or archival of old media
  • CDN integration to cache media at edge and reduce origin storage/egress
  • Cost monitoring and analysis tools (e.g., AWS S3 Analytics, cost explorer)

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

Q6

What are the legal and terms-of-service risks involved in crawling partner sites, and how would you mitigate them?

Adaptability & AmbiguityTechnical Trade-offs
Author's notes

Honestly the question I was least prepared for in a system design context.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that crawling partner sites involves both legal and relationship risks, and that the engineering solution must align with business and legal constraints. Then structure your answer around identifying risks, proposing technical and procedural mitigations, and emphasizing collaboration with legal and partner teams.

Pro tip: Show that you understand the difference between public data and partner data—partner agreements often impose stricter limits than robots.txt or copyright law. Mention that you would involve legal early and design for auditability, which demonstrates maturity beyond pure engineering.

1. Identify the risks

Enumerate legal risks (copyright, database rights, CFAA, GDPR/CCPA) and ToS risks (rate limits, prohibited scraping, account termination). Also consider partner relationship damage and reputational harm.

2. Review agreements and policies

Examine the partner contract, API terms, robots.txt, and site ToS to understand explicit permissions and restrictions. Clarify ambiguous terms with legal counsel.

3. Design technical mitigations

Implement rate limiting, respect robots.txt and crawl-delay, use caching, identify your crawler with a clear user-agent, and avoid scraping personal data. Consider using official APIs if available.

4. Establish governance and monitoring

Set up logging, alerting, and periodic audits to ensure compliance. Define escalation paths for when partners raise concerns or when terms change.

5. Communicate and collaborate

Work with legal, business, and partner teams to get explicit permission when needed and to maintain transparency. Document decisions and keep partners informed.

Key Points to Mention

  • Copyright and database rights: crawling can reproduce copyrighted content or extract substantial parts of a database.
  • Computer Fraud and Abuse Act (CFAA) and similar laws: unauthorized access or exceeding authorized access can be illegal.
  • Terms of Service violations: many sites prohibit scraping, and violating ToS can lead to account termination or legal action.
  • Data privacy regulations (GDPR, CCPA): crawling personal data without a lawful basis can result in fines.
  • Technical mitigations: rate limiting, respecting robots.txt, using APIs, caching, and anonymizing data.
  • Partner relationship management: proactive communication and legal review to avoid damaging business relationships.

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