Skip to content

ONE QUESTION. YOUR REASONING.

Design a web crawler

Design a web crawler for a search engine: start from seed URLs, download pages, follow their links, and store what you find.

System designSearch and autocompleteSenior

YOUR BRIEF

What to work through

Work through a web crawler as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Crawl from a set of seed URLs, following the links each page holds
  • Store the downloaded HTML
  • Re-crawl new and edited pages to keep the store fresh
  • Skip pages whose content was already stored

BEFORE YOU START

Constraints to discuss

  • 1 billion pages a month (Alex Xu), or 10 billion pages in under 5 days (Hello Interview)
  • Polite: obey robots.txt and send at most 1 request a second to a domain
  • Keeps going through bad HTML, slow servers, crawler traps and crashed workers
  • Keeps pages for 5 years
  • Extensible to new content types
Need a starting point?

Watch for these common gaps as you prepare:

  • No per-host queues, so one site gets a flood of requests
  • Ignoring robots.txt or the crawl delay
  • Putting raw HTML in the queue messages
  • No guard against crawler traps
  • Forgetting DNS, which can dominate each thread’s time
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.