ScalaadvancedbackendAI generated

Concurrent Web Crawler with Cats Effect Fibers

Build a web crawler that fetches pages concurrently up to a configurable depth and concurrency limit, deduplicates visited URLs, and extracts outbound links. Learners practice fiber-based concurrency, resource-safe HTTP calls, and rate limiting with Cats Effect.

Estimate
~13h
Steps
6
Completed by
0
Proposed by
codeseed.app

Cats Effect · sttp · fs2

Project roadmap

  1. 01

    Set up an HTTP client

    ~1.5h

    Configure the sttp client as a Cats Effect resource for safe acquisition and release.

  2. 02

    Implement single-page fetch and link extraction

    ~2h

    Fetch a page and parse outbound links from its HTML.

  3. 03

    Implement concurrent fiber-based crawling

    ~3h

    Spawn fibers to crawl multiple pages concurrently up to a configured depth and concurrency limit.

  4. 04

    Add URL deduplication and rate limiting

    ~2.5h

    Track visited URLs with a concurrent Ref and throttle requests per domain.

  5. 05

    Add graceful shutdown and error handling

    ~2h

    Ensure in-flight fibers are cancelled cleanly on shutdown and individual failures don't crash the crawl.

  6. 06

    Write tests

    ~2h

    Test link extraction, deduplication, and concurrency limits against a mock server.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~13h · 6 steps

Tech stack

Cats Effectsttpfs2