← Meta Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Meta SWE system design round focused on distributed web crawling at massive scale, with a variant framing it as a flight price aggregator. The design space was deep and the follow-ups kept coming.

Questions Asked (5)

Q1

Design a distributed web crawler that can handle billions of URLs per day at Meta scale.

System DesignTechnical Trade-offs
Author's notes

This is the core question and it's deceptively broad.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (billions of URLs/day, politeness, freshness, deduplication). Then propose a high-level architecture with key components (URL frontier, fetchers, parsers, storage, dedup) and dive into trade-offs for scalability, fault tolerance, and efficiency.

Pro tip: Emphasize the importance of a distributed URL frontier with per-host politeness and prioritization, as it's often the trickiest part at scale. Also, mention using a consistent hashing scheme to partition hosts across workers to avoid overloading any single host.

1. Clarify Requirements and Scale

Ask about scale (billions/day), politeness (robots.txt, crawl delay), freshness, content types, and deduplication needs. Estimate resources (bandwidth, storage, number of machines).

2. High-Level Architecture

Outline components: URL frontier (scheduler), fetchers, parsers, content storage, dedup (URL and content), and monitoring. Explain data flow from seed URLs to storage.

3. Deep Dive into Key Components

Detail the URL frontier: distributed queues, per-host politeness, prioritization. Discuss fetcher design: async I/O, rate limiting, retries, and handling failures. Explain dedup using Bloom filters or hashing.

4. Scalability and Fault Tolerance

Describe partitioning (e.g., by host), replication, and load balancing. Discuss how to handle failures (checkpointing, retries) and ensure exactly-once processing where needed.

5. Trade-offs and Optimizations

Discuss trade-offs: push vs pull, batch vs stream, storage choices (blob store vs DB). Mention optimizations like DNS caching, connection pooling, and compression.

Key Points to Mention

  • Distributed URL frontier with per-host queues and politeness
  • Deduplication using Bloom filters or distributed hash sets
  • Partitioning by host to avoid overloading and ensure politeness
  • Fault tolerance via replication, checkpointing, and retries
  • Scalability through horizontal scaling and async I/O
  • Storage: use of blob storage for content and metadata databases

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

Q2

How would you handle deduplication across billions of crawled pages?

System DesignData Modeling
Author's notes

Content hashing on normalized HTML plus URL canonicalization.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale (billions of pages), definition of duplicate (exact vs near-duplicate), and acceptable false positive/negative rates. Then propose a multi-stage pipeline: exact dedup via hashing, near-duplicate detection via shingling and MinHash/LSH, and finally a scalable distributed architecture using MapReduce/Spark with efficient storage and indexing.

Pro tip: Emphasize trade-offs between precision and recall, and how you'd handle incremental updates and deletions in a petabyte-scale system. Mention that you'd measure success with metrics like duplicate reduction rate and false positive rate, and iterate based on business impact.

1. Clarify Requirements and Constraints

Ask about scale (number of pages, growth rate), definition of duplicate (exact, near-duplicate, semantic), and acceptable false positive/negative rates. Also consider latency, cost, and update frequency.

2. Design Exact Deduplication

Use cryptographic hashes (e.g., SHA-256) of page content to identify exact duplicates. Store hashes in a distributed key-value store (e.g., Bigtable, Cassandra) or use a Bloom filter for efficient membership checks.

3. Design Near-Duplicate Detection

Apply shingling (n-grams) to convert pages into sets of shingles, then use MinHash to create compact signatures. Use Locality-Sensitive Hashing (LSH) to bucket similar signatures and compare candidates within buckets.

4. Scale with Distributed Processing

Implement the pipeline using MapReduce or Spark: map phase computes signatures, reduce phase groups and compares. Use partitioning and parallelism to handle billions of pages efficiently.

5. Address Operational Concerns

Discuss incremental updates (new pages, deletions), storage optimization (e.g., storing only signatures for non-duplicates), and monitoring (e.g., duplicate rate, false positives). Consider using a graph of duplicates for analysis.

Key Points to Mention

  • Exact deduplication using cryptographic hashing (e.g., SHA-256) and distributed storage.
  • Near-duplicate detection using shingling, MinHash, and Locality-Sensitive Hashing (LSH).
  • Scalability via MapReduce/Spark and partitioning to handle billions of pages.
  • Trade-offs between precision and recall, and how to tune thresholds (e.g., Jaccard similarity).
  • Incremental processing: handling new pages, updates, and deletions without full recomputation.
  • Storage and cost optimization: Bloom filters, signature compression, and tiered storage.

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

Q3

Walk me through your storage choices for the crawled HTML and metadata.

System DesignTechnical Trade-offs
Author's notes

I went with a wide-column store for the raw HTML and a relational DB for metadata, which led to a pretty pointed question about write amplification.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and access patterns (e.g., billions of pages, low-latency random reads for serving, batch analytics for ranking). Then propose a hybrid storage architecture: object storage for raw HTML, a distributed key-value store for metadata and inverted indexes, and a columnar store for analytics. Justify each choice with trade-offs around cost, latency, durability, and query flexibility.

Pro tip: Emphasize that storage choices must align with the lifecycle of the data—hot metadata needs low-latency access, while cold raw HTML can be archived in cheaper object storage with compression. Also mention that you'd measure and iterate based on real access patterns rather than over-engineering upfront.

1. Clarify requirements and scale

Ask about data volume, read/write patterns, latency SLAs, and durability needs. This ensures your storage choices are grounded in actual constraints.

2. Separate raw content from metadata

Store raw HTML in object storage (e.g., S3) due to large size and infrequent access, and metadata in a low-latency KV store (e.g., RocksDB, Cassandra) for fast lookups.

3. Design for access patterns

Use an inverted index (e.g., Elasticsearch) for full-text search and a columnar store (e.g., Parquet on HDFS) for analytics. Explain how each serves different queries.

4. Address trade-offs and optimizations

Discuss compression, tiered storage, caching, and sharding/replication to balance cost, performance, and durability.

5. Summarize and iterate

Conclude with a coherent architecture diagram in words and note that you'd monitor and adjust based on evolving access patterns.

Key Points to Mention

  • Object storage (e.g., S3) for raw HTML with compression and lifecycle policies to reduce cost.
  • Distributed key-value store (e.g., Cassandra, RocksDB) for metadata to achieve low-latency random reads.
  • Inverted index (e.g., Elasticsearch) for full-text search and query flexibility.
  • Columnar storage (e.g., Parquet) for batch analytics and ranking feature extraction.
  • Trade-offs: cost vs. latency, consistency vs. availability, and storage vs. compute.
  • Caching layer (e.g., Redis) for hot metadata to reduce load on primary storage.

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

Q4

How would you extend your crawler to handle JavaScript-rendered pages?

System DesignTechnical Trade-offs
Author's notes

Classic follow-up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the limitations of static crawling and the need for headless browsers. Then outline a hybrid architecture that uses headless browsers for JavaScript-heavy pages while optimizing for scale and cost. Finally, discuss trade-offs and mitigation strategies.

Pro tip: Emphasize that you would only use headless browsers when necessary, as they are resource-intensive, and propose a detection mechanism to decide when to render JavaScript. This shows cost-awareness and scalability thinking.

1. Identify JavaScript-rendered content

Explain how to detect if a page requires JavaScript rendering, e.g., by comparing initial HTML with rendered DOM or using heuristics like presence of certain frameworks.

2. Integrate headless browser

Describe using tools like Puppeteer or Playwright to render pages, execute JavaScript, and extract the fully rendered DOM.

3. Scale and optimize

Discuss strategies to handle scale, such as browser pooling, caching rendered results, and using a queue system to manage concurrency.

4. Handle trade-offs

Acknowledge increased resource usage, slower crawl rates, and potential blocking; propose solutions like rate limiting, rotating proxies, and fallback to static crawling.

5. Monitor and adapt

Suggest monitoring for changes in page rendering and dynamically adjusting the crawling strategy, e.g., switching between static and dynamic rendering based on performance metrics.

Key Points to Mention

  • Headless browsers (Puppeteer, Playwright, Selenium)
  • Resource consumption and cost implications
  • Caching rendered pages to avoid repeated rendering
  • Concurrency and queue management (e.g., using RabbitMQ, Kafka)
  • Detection of JavaScript dependency (e.g., comparing raw HTML vs rendered DOM)
  • Fallback to static crawling when possible

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

Q5

How do you handle hot shards in your distributed crawler design?

System DesignAlgorithms & Data Structures
Author's notes

This came late in the round and I was a bit fried.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining what a hot shard is in a distributed crawler context—a shard receiving disproportionate traffic due to skewed URL distribution or domain popularity. Then walk through a layered mitigation strategy: detection, dynamic rebalancing, and architectural changes to prevent recurrence, emphasizing trade-offs and practical implementation at scale.

Pro tip: Mention that hot shards are often a symptom of poor partitioning logic, not just load spikes—proactively discuss how you'd redesign the sharding key (e.g., using consistent hashing with virtual nodes or domain-based partitioning) to avoid hotspots altogether.

1. Define and Detect Hot Shards

Explain what constitutes a hot shard in your crawler (e.g., a shard handling >X% of total requests or with queue depth growing unbounded). Describe monitoring metrics like per-shard QPS, queue length, and latency to detect them early.

2. Immediate Mitigation

Outline short-term fixes: dynamic splitting of the hot shard, throttling or rate-limiting requests to that shard, or temporarily routing some traffic to underutilized shards via a load balancer.

3. Long-Term Rebalancing

Discuss rebalancing strategies such as consistent hashing with virtual nodes, range-based partitioning with dynamic splits, or using a distributed queue (e.g., Kafka) with multiple partitions and consumer groups to smooth load.

4. Preventive Design

Propose architectural changes to avoid future hotspots: shard by domain or host to localize load, use a two-level sharding scheme (e.g., by domain then by URL hash), or implement a feedback loop that adjusts shard assignments based on real-time load.

5. Trade-offs and Evaluation

Acknowledge trade-offs: rebalancing adds complexity and latency, throttling may delay crawling, and over-sharding increases overhead. Suggest metrics to evaluate effectiveness (e.g., 99th percentile latency, shard load variance).

Key Points to Mention

  • Consistent hashing with virtual nodes to distribute load evenly and minimize rebalancing impact.
  • Dynamic shard splitting/merging based on load thresholds (e.g., split when QPS exceeds capacity).
  • Use of a distributed message queue (e.g., Kafka) with partitions to decouple producers and consumers, allowing independent scaling.
  • Domain-based partitioning to group URLs from the same host, reducing cross-shard dependencies and hotspots.
  • Rate limiting and backpressure mechanisms to prevent overwhelming a single shard.
  • Monitoring and alerting on per-shard metrics (QPS, queue depth, latency) to detect hotspots early.

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