← Nooks Interview Insights

Nooks·Software Engineer·Onsite - System Design / Architecture·Intermediate

Intermediate
Apr 2026

Summary

Nooks software engineer interview with a system design round focused on building a web crawler. The core problem was straightforward but the follow-up on scaling and politeness policies is where it got real.

Questions Asked (2)

Q1

Design a web crawler that starts from a seed URL, uses BFS to traverse pages, visits each URL only once, and stays within the same domain.

System DesignAlgorithms & Data Structures
Author's notes

The BFS structure came naturally, tracking visited URLs with a set, queuing up links as you fetch each page.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a BFS-based crawler with a queue and a visited set to ensure each URL is visited once and only within the seed domain. Discuss key components like URL normalization, politeness (rate limiting), and scalability considerations such as distributed crawling and storage.

Pro tip: Emphasize politeness and robustness: mention robots.txt, crawl-delay, and handling of dynamic content or infinite loops, as these show production-level awareness beyond basic BFS.

1. Clarify Requirements

Ask about scale, depth limits, politeness policies, and whether dynamic pages or authentication are involved. Confirm that only same-domain URLs should be crawled and that BFS order is required.

2. Design Core Data Structures

Use a queue for BFS and a set (or Bloom filter for scale) to track visited URLs. Normalize URLs (e.g., remove fragments, resolve relative paths) before deduplication.

3. Outline Crawling Loop

Dequeue a URL, fetch the page, parse links, filter to same domain, and enqueue unseen URLs. Include error handling, retries, and respect for robots.txt and crawl-delay.

4. Address Scalability and Politeness

Discuss distributed crawling with partitioned queues, rate limiting per host, and storage of visited URLs (e.g., Redis, Bloom filter). Mention handling of large-scale data and fault tolerance.

5. Discuss Trade-offs and Extensions

Compare BFS vs. DFS, single-machine vs. distributed, and exact vs. approximate deduplication. Suggest extensions like prioritizing important pages or handling JavaScript-rendered content.

Key Points to Mention

  • BFS traversal using a queue ensures level-order crawling and fairness.
  • Visited set (or Bloom filter) prevents duplicate visits and infinite loops.
  • Domain restriction: filter URLs to only those matching the seed domain (including subdomains if allowed).
  • URL normalization: handle relative URLs, fragments, query parameters, and case sensitivity.
  • Politeness: respect robots.txt, implement crawl-delay, and use a user-agent string.
  • Scalability: distributed crawling with partitioned queues, rate limiting, and efficient storage of visited URLs.

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

Q2

Your crawler makes API calls to fetch pages. How do you prevent it from becoming a bottleneck or getting flagged as a DDOS attacker?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is the part that actually matters and I wasn't fully ready for how deep they wanted to go.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the dual challenge: maintaining efficient crawling throughput while being a good API citizen. Then outline a multi-layered strategy covering rate limiting, concurrency control, backoff, and identification, and tie it back to system design principles like trade-offs between speed and politeness.

Pro tip: Mention that you would monitor for 429/503 responses and dynamically adjust concurrency, and that you'd respect robots.txt and API terms of service to avoid legal issues. This shows you think about both technical and non-technical aspects.

1. Identify constraints and requirements

Determine the API's rate limits, terms of service, and the crawler's throughput needs. Understand the trade-off between speed and politeness.

2. Implement rate limiting and concurrency control

Use a token bucket or leaky bucket algorithm to limit requests per second, and control the number of concurrent connections to avoid overwhelming the API.

3. Add adaptive backoff and retry logic

On receiving 429 or 5xx errors, exponentially back off and retry with jitter. Dynamically reduce request rate if errors persist.

4. Identify and differentiate your crawler

Set a custom User-Agent with contact info, and consider using an API key if provided. This helps the API owner distinguish you from malicious actors.

5. Monitor and adjust

Track response times, error rates, and throughput. Use this data to tune rate limits and concurrency, and to detect if you're being throttled or blocked.

Key Points to Mention

  • Rate limiting algorithms (token bucket, leaky bucket)
  • Concurrency control (e.g., semaphores, worker pools)
  • Exponential backoff with jitter
  • Respecting robots.txt and API terms of service
  • Setting a descriptive User-Agent and using API keys
  • Monitoring and adaptive throttling based on response codes

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