← Meta Interview Insights

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

SeniorPrefer not to say
Jul 2026

Summary

Meta system design round for a software engineering role. The problem was a web crawler, which sounds manageable until you start thinking through all the moving parts at scale. Left feeling like I covered the basics but probably undersold some of the trickier bits.

Questions Asked (6)

Q1

Design a web crawler that continuously discovers and downloads web pages at scale, starting from a set of seed URLs.

System DesignTechnical Trade-offs
Author's notes

I started with the URL frontier and BFS-style expansion, which felt right, but I stalled a bit when they pushed on prioritization.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying scale requirements and constraints (pages per second, storage, freshness needs), then design the system top-down covering URL frontier management, distributed fetching, parsing, and storage. Explicitly call out trade-offs at each layer — such as politeness vs. throughput and BFS vs. priority-based crawling — to demonstrate engineering maturity.

Pro tip: At Meta scale, interviewers want to see you reason about the URL frontier as the hardest bottleneck — bring up priority queues, politeness delays per domain, and how to avoid crawling duplicate or near-duplicate content using techniques like SimHash or URL canonicalization.

1. Clarify Requirements & Estimate Scale

Ask about target pages per second (e.g., 1B pages/month ≈ ~400 pages/sec), freshness requirements, scope (entire web vs. specific domains), and whether recrawling is needed. Derive storage estimates — average page ~100KB means ~100TB for 1B pages.

2. Define High-Level Architecture

Sketch the core pipeline: Seed URLs → URL Frontier → Fetcher Workers → HTML Parser → Content Store + URL Extractor → back to Frontier. Identify that this is a distributed, asynchronous system with multiple decoupled components communicating via queues.

3. Deep-Dive the URL Frontier

Explain how the frontier must enforce politeness (one request per domain per N seconds), prioritization (PageRank, freshness signals), and deduplication (Bloom filter or distributed hash set). Discuss using a two-tier queue — a priority queue feeding per-domain back queues — to balance throughput and politeness.

4. Design the Fetcher & Parser Layer

Describe a pool of distributed fetcher workers that respect robots.txt, handle retries with exponential backoff, and use DNS caching to reduce latency. After fetching, parsers extract links, canonicalize URLs, and detect duplicate content using hashing (e.g., SimHash for near-duplicates).

5. Address Storage, Fault Tolerance & Trade-offs

Discuss storing raw HTML in distributed blob storage (e.g., S3-equivalent) with metadata in a distributed DB, and using Kafka or similar for inter-component communication to handle backpressure. Explicitly call out trade-offs: crawl breadth vs. depth, freshness vs. cost, and centralized vs. distributed frontier.

Key Points to Mention

  • URL Frontier design: two-tier priority + per-domain politeness queues to avoid overloading servers
  • Deduplication strategies: exact-match hashing for URLs, SimHash for near-duplicate content detection
  • Robots.txt compliance and crawl-delay respect as both a legal and ethical requirement
  • Distributed fetcher workers with DNS caching, connection pooling, and robots.txt caching for efficiency
  • Recrawl scheduling based on page change frequency (exponential back-off for rarely-changing pages)
  • Fault tolerance: idempotent workers, checkpointing frontier state, and dead-letter queues for failed fetches

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

Q2

How would you handle duplicate URL detection and avoid re-crawling the same pages?

System DesignAlgorithms & Data Structures
Author's notes

Bloom filter was my first answer and they seemed fine with it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame your answer around the trade-offs between memory efficiency, speed, and accuracy when detecting duplicates at web-scale, covering both URL-level and content-level deduplication. Start with the simplest approach and progressively introduce more scalable solutions, explaining why each upgrade is necessary. Tie your design choices back to real-world constraints like billions of URLs, distributed systems, and latency requirements.

Pro tip: Impress the interviewer by distinguishing between URL-level deduplication (exact match) and content-level deduplication (near-duplicate pages with different URLs), and mention that production crawlers like Googlebot handle both — this shows you understand the full problem space beyond the obvious solution.

1. Define the Scale and Constraints

Clarify the expected number of URLs (e.g., billions), acceptable false positive rate, memory budget, and whether the system is distributed. This grounds your solution in realistic engineering trade-offs rather than theoretical ideals.

2. URL Normalization First

Before any deduplication logic, normalize URLs by canonicalizing schemes, lowercasing hostnames, removing default ports, sorting query parameters, and stripping fragments. This eliminates trivial duplicates caused by syntactic differences pointing to the same resource.

3. Choose the Right Data Structure for URL Deduplication

Walk through the progression from a HashSet (simple but memory-heavy) to storing URL hashes (MD5/SHA-256) to a Bloom Filter for memory-efficient probabilistic deduplication. Explain the false positive trade-off of Bloom Filters and how to tune the bit array size and hash functions.

4. Handle Content-Level Deduplication

Explain that different URLs can serve identical or near-identical content, so after fetching a page, compute a fingerprint using SimHash or MinHash to detect near-duplicates. Store these fingerprints in a distributed store and compare against them before scheduling further crawls.

5. Distributed Coordination and Recrawl Policy

Describe how in a distributed crawler, a centralized URL frontier (e.g., backed by Redis or a distributed queue) with consistent hashing ensures no two workers crawl the same URL simultaneously. Also address recrawl scheduling using TTL-based expiry or change-frequency signals to revisit pages that may have updated content.

Key Points to Mention

  • URL normalization and canonicalization as a prerequisite step before deduplication
  • Bloom Filters for memory-efficient probabilistic URL deduplication with tunable false positive rates
  • Hashing URLs (MD5/SHA-256) to reduce storage footprint compared to storing raw URLs
  • SimHash or MinHash for near-duplicate content detection at the page level
  • Distributed URL frontier with consistent hashing to coordinate deduplication across multiple crawler nodes
  • Recrawl policies using TTL, last-modified headers, or change-frequency estimation to balance freshness vs. efficiency

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

Q3

How would you enforce per-domain rate limits and respect robots.txt rules across a distributed crawler?

System DesignTechnical Trade-offs
Author's notes

This is where I got a bit tangled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by decomposing the problem into two distinct concerns — rate limiting enforcement and robots.txt compliance — then explain how each is handled in a distributed context where multiple crawler nodes may target the same domain. Ground your answer in concrete data structures and coordination mechanisms (e.g., Redis, consistent hashing, centralized policy stores) before discussing trade-offs.

Pro tip: Mention that robots.txt should be fetched, cached with a TTL, and respected at the URL frontier level before a URL is even dispatched to a worker — not after — to avoid wasted fetches and potential legal/ethical issues. This signals you think about correctness and compliance proactively, not reactively.

1. Define the Scope and Constraints

Clarify the scale (number of domains, crawl rate targets, number of crawler nodes) and whether rate limits are self-imposed politeness policies or externally mandated. This sets the stage for why naive per-node solutions fail and why coordination is necessary.

2. Centralized Rate Limiting with Domain Affinity

Explain using a shared rate-limit store (e.g., Redis with token bucket or sliding window counters keyed by domain) combined with consistent hashing or a URL frontier that assigns each domain to a specific crawler shard. This prevents multiple nodes from hammering the same domain independently.

3. robots.txt Fetching, Parsing, and Caching

Describe fetching robots.txt once per domain at crawl start and caching it (e.g., in a distributed cache or the frontier metadata store) with a reasonable TTL (e.g., 24 hours). The frontier or a pre-dispatch filter checks each URL against the cached rules before enqueuing it for download.

4. Frontier Design and Politeness Queues

Introduce a per-domain back queue with a configurable delay between requests (e.g., 1–5 seconds), enforced by a scheduler that only releases the next URL for a domain after the delay has elapsed. This naturally enforces crawl-delay directives from robots.txt and prevents thundering-herd issues.

5. Failure Handling and Trade-offs

Address edge cases: what happens if the robots.txt fetch fails (fail-open vs. fail-closed policy), how to handle rate-limit signals like HTTP 429 responses (exponential backoff, dynamic throttling), and the trade-off between crawl throughput and server politeness.

Key Points to Mention

  • Token bucket or sliding window algorithm in Redis for distributed per-domain rate limiting
  • Consistent hashing or domain-sharded frontier queues to achieve domain affinity across crawler nodes
  • robots.txt caching with TTL and pre-dispatch URL filtering to avoid disallowed fetches
  • Respecting Crawl-Delay directives from robots.txt in the per-domain scheduling queue
  • Dynamic backoff on HTTP 429 or 503 responses as a real-time rate-limit signal
  • Fail-safe policy for robots.txt fetch failures and periodic re-validation of cached rules

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

Q4

How would you prioritize which pages to crawl first, balancing importance and freshness?

System DesignRoadmap Prioritization
Author's notes

Froze for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame your answer around a multi-signal scoring system that combines static importance signals (PageRank, domain authority, inbound links) with dynamic freshness signals (change frequency, last-modified headers, user engagement). Explain how you'd use a priority queue or tiered scheduling system to balance these competing factors at scale. Ground your answer in real-world constraints like crawl budget, bandwidth, and politeness policies.

Pro tip: Mention that freshness requirements are not uniform — news pages may need recrawling every few minutes while static documentation pages may only need monthly recrawls — and that a machine-learned model trained on historical change patterns can outperform hand-tuned heuristics at Meta's scale.

1. Define the Objective

Clarify that the goal is to maximize the utility of the crawl budget by ensuring the most important and most stale pages are crawled first. Acknowledge the tension between importance (high-value pages) and freshness (frequently changing pages).

2. Establish Importance Signals

Describe static signals such as PageRank, inbound link count, domain authority, and user engagement metrics (click-through rates, dwell time) to score a page's relative importance. Explain how these signals can be pre-computed and stored to avoid real-time computation overhead.

3. Model Freshness and Change Rate

Use historical crawl data to estimate each page's change frequency using models like a Poisson process, and factor in HTTP signals like Last-Modified and ETag headers. Pages with high change rates and high importance should receive the highest crawl priority.

4. Design the Priority Scoring System

Combine importance and freshness into a unified priority score, for example: Priority = α × ImportanceScore + β × StalenessScore, where staleness grows as time since last crawl increases. Use a distributed priority queue (e.g., backed by a heap or a system like Kafka with priority lanes) to schedule URLs accordingly.

5. Handle Operational Constraints

Address crawl politeness (rate limiting per domain via robots.txt and crawl delays), crawl budget allocation across domains, and feedback loops where crawl results continuously update priority scores. Discuss how to handle newly discovered URLs with no historical data using cold-start heuristics.

Key Points to Mention

  • Crawl budget management and the need to maximize utility per crawl given finite resources
  • Multi-signal priority scoring combining PageRank/link graph importance with staleness metrics
  • Poisson or exponential change-rate modeling based on historical crawl diffs to predict when a page will change
  • Tiered crawl scheduling (e.g., high-frequency tier for news/social content, low-frequency tier for static pages)
  • Politeness policies including robots.txt compliance, per-domain rate limiting, and avoiding server overload
  • Feedback loops where post-crawl data (did the page actually change?) continuously refines the priority model

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

Q5

How would you store the fetched page content and associated metadata at scale?

System DesignData Modeling
Author's notes

Pretty standard.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale requirements (e.g., billions of pages, petabytes of data) and then propose a tiered storage architecture that separates raw content from structured metadata. Justify each technology choice by mapping it to specific access patterns, consistency requirements, and cost constraints relevant to a company like Meta.

Pro tip: Interviewers at Meta love when candidates proactively discuss trade-offs between consistency and availability (CAP theorem) and mention how they'd handle hot spots or skewed access patterns — this signals you've thought beyond the happy path.

1. Clarify Scale & Access Patterns

Establish concrete numbers — billions of URLs, petabytes of raw HTML, read/write ratios, and latency SLAs. Distinguish between frequent metadata lookups versus infrequent full-content retrievals to drive storage decisions.

2. Separate Raw Content from Metadata

Propose storing raw page content (HTML, images) in a distributed object store like Amazon S3 or HDFS, while keeping structured metadata (URL, crawl timestamp, content hash, status codes) in a scalable database. This separation optimizes cost and query performance independently.

3. Choose the Right Metadata Store

Recommend a wide-column store like Apache Cassandra or HBase for metadata, using the URL or a hashed URL as the partition key to ensure even distribution. Discuss indexing strategies for common query patterns such as recrawl scheduling or domain-level aggregations.

4. Address Deduplication & Versioning

Use content hashing (e.g., SHA-256 or SimHash for near-duplicates) to avoid storing redundant page content and to detect changes between crawl cycles. Store multiple versions of metadata with timestamps to support historical analysis and change detection.

5. Plan for Reliability & Scalability

Discuss replication factors, geo-distribution for fault tolerance, and a caching layer (e.g., Memcached or Redis) for hot metadata records. Mention a message queue (e.g., Kafka) to decouple ingestion from storage writes and handle traffic spikes gracefully.

Key Points to Mention

  • Tiered storage: object store (S3/HDFS) for raw content vs. wide-column DB (Cassandra/HBase) for metadata
  • Partitioning strategy using hashed URLs to avoid hot spots and ensure even data distribution
  • Content deduplication via exact hashing (SHA-256) and near-duplicate detection (SimHash/MinHash)
  • Versioning and timestamping metadata to support recrawl scheduling and change detection
  • Caching layer (Redis/Memcached) for frequently accessed metadata to reduce database load
  • Asynchronous ingestion pipeline using Kafka to decouple crawlers from storage and handle backpressure

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

Q6

How would you make the crawler fault tolerant and resumable if workers crash mid-crawl?

System DesignTechnical Trade-offs
Author's notes

Leaned on a persistent job queue with acknowledgment-based delivery so unfinished URLs get retried.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame your answer around the core principles of idempotency, durable state management, and work queue design to ensure no URLs are lost or double-processed when workers fail. Walk through the lifecycle of a crawl task from assignment to completion, identifying failure points and the mechanisms that handle each one. Conclude by discussing trade-offs between consistency guarantees and throughput.

Pro tip: Mention visibility timeouts and at-least-once delivery semantics explicitly — interviewers at Meta want to see you understand that 'exactly-once' is extremely hard to guarantee at scale, and that designing for idempotent URL processing is the pragmatic engineering solution.

1. Define the Failure Modes

Start by enumerating what 'crash mid-crawl' means: worker process dies, network partition, OOM kill, or slow worker that appears dead. Scoping failure modes shows systematic thinking and sets up your solution cleanly.

2. Durable Work Queue with Visibility Timeouts

Explain using a persistent, distributed queue (e.g., Kafka, SQS, or a Redis-backed queue) where tasks are not deleted upon dequeue but instead hidden for a visibility timeout period. If a worker crashes before acknowledging completion, the task automatically reappears for another worker to claim.

3. Idempotent URL Processing

Describe maintaining a distributed 'seen' or 'completed' set (e.g., using a distributed hash set in Redis or a database) so that if a URL is re-processed after a worker crash, the duplicate work is safely detected and skipped without corrupting state.

4. Checkpointing and State Persistence

Discuss persisting crawl progress — such as partially parsed pages or discovered child URLs — to durable storage before acknowledging task completion, ensuring that a crash mid-parse doesn't lose discovered links. Only mark a task complete after all child URLs are enqueued.

5. Monitoring, Dead-Letter Queues, and Retry Limits

Explain capping retry attempts per URL and routing persistently failing tasks to a dead-letter queue for manual inspection or alerting, preventing poison-pill URLs from consuming worker capacity indefinitely.

Key Points to Mention

  • Visibility timeout / lease-based task ownership to handle worker crashes without data loss
  • At-least-once delivery semantics and why idempotency is the practical solution over exactly-once guarantees
  • Distributed deduplication store (e.g., Redis SET or Bloom filter) to prevent redundant re-crawling
  • Atomic checkpoint-then-acknowledge pattern: persist state before releasing the task lock
  • Dead-letter queues and bounded retry counts to handle poison-pill or permanently failing URLs
  • Heartbeat or health-check mechanisms so the coordinator can proactively reclaim tasks from slow/dead workers rather than waiting for timeout expiry

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